Copied to clipboard

Flag this post as spam?

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


  • psiho 101 posts 96 karma points
    Nov 22, 2011 @ 10:08
    psiho
    0

    crop problem/question

    I have a website with thousands of images and I need to create thumbnails for those. I need them to fit 80x80x boxes but only visually which means that is going to be done in CSS (overflow will be hidden with CSS and displayed onMouseOver)

    If I use ImageGen resize and keep constraints to 80x80, the it resizes longes size to 80px and I need resize of shorter size to 80px so CSS box is allways filled.

    Is this possible?

     

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Nov 22, 2011 @ 11:30
    Douglas Robar
    0

    ImageGen resizes based on the long dimension, not the short side. You can certainly use the &crop=resize parameter and ImageGen will make a perfect 80x80 thumbnail with proportions retained. Or, you might use the &pad=true&constrain=true options to have the resized (but not cropped) image fit within a perfect 80x80 image, with any unused spaced filled with the &bgcolor= color to match your design.

    Alternatively, the macro that generates all the thumbnails could interrogate the original files' dimensions and you could then specify custom &width= &height= dimensions for each image to have the short side be 80px and the long side the proportionate size, using CSS to hide the overflow.

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft