ZenphotoCMS Forum
Different sizes for landscape and portrait oriented images - 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: Different sizes for landscape and portrait oriented images (/thread-10269.html)



Different sizes for landscape and portrait oriented images - beat-x - 2012-08-04

Dear all

I would like to tell Zenphoto: "Resize landscape oriented images such that they are exactly 800 pixels wide, please calculate the height accordingly. And please resize portrait oriented images such that they are exactly 500 pixels in height, calculate width automatically."

How do I achieve this with
a) zenphoto functions and
b) with i.php parameters?

The "s" parameter does not do that, because it also resizes portrait oriented images to that value in height.




Different sizes for landscape and portrait oriented images - fretzl - 2012-08-04

You can use the function isLandscape().

Something like:
if(isLandscape()) { do something; } else { do something else; }




Different sizes for landscape and portrait oriented images - acrylian - 2012-08-04

Or use the set of maxspace custom image functions to set max width and max height for images on your theme. Info on the functions documentation on the user guide.