Member
Member
n20capri   2009-11-06, 23:16
#1

I'm using the random thumbnail script (http://www.zenphoto.org/2008/01/hacks/#random-image-external-site) to display some random thumbs on my site - most of the images are landscape but portrait images get squished when setting width and height...

If I leave off the height and width parameters they just default to 50 50 (what the random.php file says). This way all the images gets squished.

I'd like to be able to set thumbnail percentages so everything stays in proportion. I'd even be ok with the square cropping used in the normal galleries - at least nothing would look out of proportion...

Thanks,
Mike

Administrator
Administrator
acrylian   2009-11-07, 10:14
#2

That is not possible by technical reasons. The gdlib that crops/sizes the images needs px values. What you would have to do is to get the full size of an image (see the doc) as 100% and compute the percentage you want from that into pixel values.

Member
Member
n20capri   2009-11-07, 15:19
#3

How can I use the square cropping used in the standard galleries then? As I said I just don't like when the images are out of proportion...at least the cropping keeps the pic in proportion - just cutting it off a bit...
Thanks

Administrator
Administrator
acrylian   2009-11-07, 16:31
#4

I am sorry, the random image script is a third party I don't know anything about. It is surely possible but you will probably have to modify that script using our functions. Pleas take a look at the documentation.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.