Scaling Images

What i want to do is the following:

I got a div with absolute width and height(landscape).
every image should rather get something like a "vertical" and "landscape" tag (or something) so my vertical image would always be 400px heigh, and my landscape images always 680 wide. here is a scribble of what i mean:

http://www.uniqrn.com/data/scaleImage.jpg

My problem is, that zenphoto doesn´t look like supporting something like that. or is there already any solution?

would be great!

Comments

  • Hello,

    I found printCustomSizedImageMaxHeight() little crappy, it didn’t exactly image resize, but some image resize plus <img> attribs width or heights, so JPGS looks not good, code below just resize image:

    `<?php<br />
    $desirableThumbWidth = 150;

    $desirableThumbHeight = 100;

    if (isLandscape()) {

    $myImgSrc = getCustomImageURL(NULL,$desirableThumbWidth,NULL);

    }

    else {

    $myImgSrc = getCustomImageURL(NULL,NULL,$desirableThumbHeight);

    }

    ?>

    image" />`
  • acrylian Administrator, Developer
    That function does not use any <img> attribute for sizing:
    `function printCustomSizedImageMaxHeight($maxheight) {

    if (getFullWidth() === getFullHeight() OR getDefaultHeight() > $maxheight) {

    printCustomSizedImage(getImageTitle(), null, null, $maxheight, null, null, null, null, null, null);

    } else {

    printDefaultSizedImage(getImageTitle());

    }

    }`
    It's not really meant for thumbs but for the sized image on image.php as such it works together with the image size you define in the image options.
Sign In or Register to comment.