Copied to clipboard

Flag this post as spam?

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


  • Kristian 15 posts 35 karma points
    Oct 02, 2011 @ 19:19
    Kristian
    0

    Create a canvas with strict size and add a image to that

    Hi,

    I'm using ImageGen today and have problems when uploaded images not having the same size.

    I have a gallery which are sliding images. WHen a user uploads a image with a image layout horizontal (laying) it works fine.

    But when he uploades a image with a image laoyot vertical (standing) my gallery makes it look really strange.

    What i want to do is to have imagegen to always create a image with strict size and color the background for example white if the image is vertical.

    Then i will always will have the same size and the image uploaded will be pasted into the "canvas" with the same size.

     

    Please help me!

     

    Regards Kristian

  • Rich Green 2246 posts 4008 karma points
    Oct 02, 2011 @ 20:52
    Rich Green
    0

    Hi Kristian,

    Welcome to the Umbraco forum!

    You can achieve what you're trying to do using something like this:

    /imagegen.ashx?image=bigImage.jpg&width=50&height=50&constrain=true&pad=true&bgcolor=white

    Rich

  • Kristian 15 posts 35 karma points
    Oct 02, 2011 @ 21:42
    Kristian
    0

    Hi Rich,

     

    THANK YOU!!! Worked like a charm!

    I must say I'm very impressed of how fast you answered!

     

    Thanks again!

     

  • Rich Green 2246 posts 4008 karma points
    Oct 02, 2011 @ 22:16
    Rich Green
    0

    Hey Kristian,

    No problem

    Glad you got it working  :)

    Rich

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies