zenphoto forums » Usage Support

Different sizes for landscape and portrait oriented images

(3 posts)
  1. beat-x

    Apprentice
    Joined: Aug '12
    Posts: 1

    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.

    Posted 9 months ago #
  2. Zenphoto support team
    fretzl

    Moderator
    Joined: Sep '08
    Posts: 528

    You can use the function isLandscape().

    Something like:

    if(isLandscape()) {
    do something;
    } else {
    do something else;
    }
    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  3. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,341

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.