Member
Member
PierreSnugg   2008-04-28, 17:05
#1
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!
Administrator
Administrator
acrylian   2008-04-28, 18:21
#2
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functionprintCustomSizedImageMaxHeight
Member
Member
steadingman   2008-05-12, 07:45
#3
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

$desirableThumbWidth = 150;

$desirableThumbHeight = 100;

if (isLandscape()) {

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

}

else {

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

}

?>

[img]<?=$myImgSrc?>[/img]`
Administrator
Administrator
acrylian   2008-05-12, 08:17
#4
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.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.