I need to find the original height/width of the thumbnail image for the current album so that I can work out the images aspect ratio.
I've tried getDefaultHeight/getDefaultWidth but I can't get them to return a value.
I'm guessing I need to pass an image into these functions as no image is selected by default (like they were in my next_image loop) but I can't figure out how to get it working.
Any help would be appreciated.
Comments
`
<?php
$originalWidth = $_zp_current_album->getAlbumThumbImage()->getWidth();
$originalHeight = $_zp_current_album->getAlbumThumbImage()->getHeight();
...
do something
...
?>
`
Info on all functions you find here: http://www.zenphoto.org/documentation/elementindex.html
(use the browser page search to find something). Note the difference between normal functions and class methods ;-)
You can also get the size of the full image by using `getSizeFullImage($image)` where `$image` must be an image object unless you are on the single image.php page.
There is also `isLandscape($image)` to find the orientation of the (uncropped) image.