ZenphotoCMS Forum
Scaling Images - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Scaling Images (/thread-2773.html)



Scaling Images - PierreSnugg - 28-04-2008

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!




Scaling Images - acrylian - 28-04-2008

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




Scaling Images - steadingman - 12-05-2008

Hello,

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

`

[img][/img]`




Scaling Images - acrylian - 12-05-2008

That function does not use any 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.