ZenphotoCMS Forum
getCustomImage and correct proportions? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: getCustomImage and correct proportions? (/thread-10028.html)



getCustomImage and correct proportions? - fuzzi - 2012-05-30

Hi,

i wonder how to tell the getCustomImage() function to leave the image proportions as they were, when the original-image is upright and the customimage is in landscape format?

I always get heavily squeezed images when the original image is higher than the customimage i want to render it to.

like here: http://www.dieleinwand.de/leinwandbilder/Albrecht-Duerer/

Do you have a clue how the correct parameters are for the getCustomImage function? I triend around with a thousand different settings but i had no luck.

thanks for your help!




getCustomImage and correct proportions? - fretzl - 2012-05-30

What does your function look like now ?




getCustomImage and correct proportions? - acrylian - 2012-05-30

It is a little complicated, you have to use a mixture of cropx/y and crop height and width. Only cropwidth/height is not enough. Here is the example for the thumbs on our site's showcase section:

printCustomSizedImage(getBareImageTitle(), NULL, 255, 128, 255, 128,NULL,NULL,"thumbnail",NULL,true,false)




getCustomImage and correct proportions? - fuzzi - 2012-05-31

fantastic, thanks alot acrylian, it works perfeclty