Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alexander Croner 71 posts 282 karma points
    Oct 02, 2018 @ 14:32
    Alexander Croner
    0

    Hello,

    I have following markup in a view:

    <img alt="About image" class="img-fluid" src="@Model.ImageUrl?width=600&height=450&mode=crop"/>
    

    But I'd like it to crop from a position instead, like, crop everything that is outside my dimension from the left side...

    Is this possible with the built in ImageProcessor?

    The Image I'm using here is just a normal media picker (because I don't want to complicate with cropper).

  • Garðar Þorsteinsson 113 posts 534 karma points
    Oct 02, 2018 @ 15:27
    Garðar Þorsteinsson
    0

    Hi Alexander,

    Yes you can :)

    Can do something like:

    ?crop=0,0,0,31.06502&cropmode=percentage&width=600&height=450&mode=crop
    

    Can read about it here: http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/crop/

  • Alexander Croner 71 posts 282 karma points
    Oct 03, 2018 @ 06:50
    Alexander Croner
    0

    Thanks! This worked perfectly.

    I actually tried something similar based on that documentation but couldn't get it to work. But now it does, I must have messed up somehow!

    Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft