Copied to clipboard

Flag this post as spam?

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


  • Proxicode 128 posts 324 karma points
    Jul 24, 2015 @ 02:10
    Proxicode
    0

    Image Cropper / Slimmage

    Is ratioMode:ImageCropRatioMode.Height still a valid argument when using the ImageCropper? I have the following code

    <ul class="bxslider">
        @{
        char[] splitChar = { ',' };
        string[] ids = CurrentPage.BannerImage.ToString().Split(splitChar, StringSplitOptions.RemoveEmptyEntries);
        foreach(var id in ids)
        {
        var slideImage = Umbraco.TypedMedia(id);
        <li>
            <a href="#">
            <img src="@slideImage.GetCropUrl(607, 354, ratioMode: ImageCropRatioMode.Height)" alt="">
            </a>
        </li>
        }
        }                   
    </ul>
    

    I am getting the following error..

    The name 'ImageCropRatioMode' does not exist in the current context
    

    Without the ratioMode argument, the image cropper seem to be working. Problem is that when crunched down horizontally (like in iPad view) the container grows vertically, but the image does not.

    Thanks for any help

    -Roger

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 24, 2015 @ 08:08
    Dennis Aaen
    1

    Hi Roger,

    DonĀ“t know if you have seen the uHangout episode about the image cropper if not perhaps it can help you, there is a part about the ratioMode:ImageCropRatioMode.Height

    https://www.youtube.com/watch?v=bQsvGmnYaUU

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft