Hey, all -- I've been reading various posts in the forum but haven't found one that helps with this problem.
I want to change ZenPhoto's sizing behavior so that no image is more than 800 pixels wide and no more than 494 pixels high. Right now it seems I have the option to set either the maximum [i]width[/i] or the maximum for [i]both[/i]. There's no separate setting for max height.
(I read the thread at http://www.zenphoto.org/support/topic.php?id=640&replies=25#post-3739, but it didn't help.)
I want ZenPhoto to shrink the photo so that the height is
That code is old and indeed not optimal. But I really would like to suggest to look at our functons guide, we have already a function for that:
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functionprintCustomSizedImageMaxHeight
I looked at the documentation and am confused here. I'm hoping I can resolve this for my sub albums. I don't want my images cropped but I want 220px wide on my landscape, and my portrait to be no taller than my landscaped (180px). I have been using this '``' . Any help would be appreciated.
ok, what I wanted wasn't so difficult. sorry
In this entire comment PORTRAIT refers to portrait orientation (image height > image width) and LANDSCAPE to landscape orientation (image height < image width).
People who visit my gallery get frustrated if they have to scroll down to see the entire PORTRAIT image. Currently the only way to avoid this is to specify a low number (say 595px) which applies both to image height and width. This solves the scrolling problem in the case of PORTRAITS but in turn LANDSCAPES become unnecessarily small. This is also currently an issue in the SLIDESHOW plugin where the sudden appearance of a scroll bar in certain images causes the entire slideshow to shift in an unsightly fashion.
What would be nice:
[i]A way to maximize the use of browser-window real estate i.e the displayed image [b](regardless of orientation)[/b] should use as much of the [b]available[/b] browser window as possible without the user needing to scroll. This should be an option both in regular image galleries and slideshows.[/i]
@eddiejanzer: You can use this code to get a image in a given space w x h (this code is more effective than the function mentioned above):
`if (getFullWidth() === getFullHeight() OR getFullWidth() > getFullHeight()) { printCustomSizedImage(getImageTitle(), null, 150, null);
} else {
printCustomSizedImage(getImageTitle(), null, null , 150);
}`
You can of course replace the used function with the printcustomalbumthumbimage one above. We will add this as default behavior in the future, meaning you will be able to set a width and height for uncropped thumbs/sized images instead of setting only a size sometime in the future.
jayray999:
To your browser window idea,. I think this could be done as a theme option. And you can do that with CSS alone, you just need to set the and it's width/height attributes to a relative percentage for example. Then the image will scale if you change the browser window. You could even use max-width to prevent them getting too big if their resolution does not allow.
I am reading every comment because I have a small geographically specific real estate MLS database with images that are actually on a different server so I have very little control over the way the images are displayed...I want to find out more about zenphoto CMS and php/mysql integration because I have the image URL's and the dimensions in an already existing database