image size - max height and max width - fit inside

For main image (not full size, not thumb), it would be useful to be able to set a maximum canvas area that the image can use.

Currently, image size is either set by width or longest edge.

This feature would effectively also allow it to be set by height.

Comments

  • printCustomSizedImage
    printCustomSizedImageMaxHeight
  • acrylian Administrator, Developer
    printCustomSizedImageMaxHeight is somehow considered as depractated and that functionality is already on the to do list.

    Meanwhile you could try this code that is more reliable than the function above on your image.php (works for thumbnails except album thumbs, too):
    `
    if (getFullWidth() === getFullHeight() OR getFullWidth() > getFullHeight()) { printCustomSizedImage(getImageTitle(), null, , null);
    } else {
    printCustomSizedImage(getImageTitle(), null, null , );
    }
    `
  • I'll try that...

    Thanks
  • That works, thanks again...

    :-)
  • The only downside I have found with this temporary code is that the watermark is scaled...
  • according to:

    http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintCustomSizedImage

    you can turn the watermark off, but it's not working for me. i tried:

    <?php printCustomSizedImage(getImageTitle(), null, null , 85,'' ,'' , '', '', '', '', false); ?>
  • Did you clear your cache? If the image is already cached with a watermark, no amount of code changes will get rid of it, only a cache clear.
  • yes i cleared the cache. the new created tumbnails still have the watermark with this code:

    <?php printCustomSizedImage(getImageTitle(), null, null , 85,'' ,'' , '', '', '', '', false); ?>
  • Congratulations, you forced me to go read the document. Maybe you should have done so as well: `bool $thumbStandin: set true to inhibit watermarking`
  • alright, english is not my first language and i struggled with the word "inhibit" (thought it was something like "include"), therefore i tried both false and true, only with true i didnt clear the cache.

    but it's working now properly and i learned a new word, damn you guys are good :)
  • acrylian Administrator, Developer
    Sterk, I had to look into a dictionary as well, since english is not my first language, too..:-)
Sign In or Register to comment.