![]() |
|
getSizeCustomImage & getCustomSizedImageMaxSpace - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: getSizeCustomImage & getCustomSizedImageMaxSpace (/thread-6936.html) |
getSizeCustomImage & getCustomSizedImageMaxSpace - pju_photo - 2010-04-19 Hello, first of all I want to thank everyone involved with it for ZenPhoto - I'm really liking it. Yet to be brutally honest that's not why I registered to this forum. Rather, the reason for that was the following problem: I'm coding my second custom theme now and would like to know whether there is an easy way to find out the width of images gained via getCustomSizedImageMaxSpace(). At first I thought I could work around this by passing a width to getSizeCustomImage for landspace formats and a height for portrait formats. But of course this doesn't work for narrow landscape shots - like say a 5x4 format. I tried passing both the original size (via getSizeCustomImage), 0 and empty $size values to getSizeCustomImage with my desired max width / height as the second and third parameter but to no avail. Am I missing out on something in here or is there just no way to do this with the template functions? I guess I could figure some workaround out by myself, but if there is an easy way to do this it would be great. Thanks a lot, getSizeCustomImage & getCustomSizedImageMaxSpace - acrylian - 2010-04-19 The maxspace set of image functions is meant to be used to scale images to fit in the width x height size defined. So what you describe is what they are meant for. But in case your images do not store the right values internally it might go wrong. A link to the image in question would help. getSizeCustomImage & getCustomSizedImageMaxSpace - pju_photo - 2010-04-19 Wow, thanks for the fast reply. What I want to do is get the width of the resulting picture so I'll be able to use it as the width for the div container I'm putting it in. What the problem is: let's say I have an image with a size of I thought I could fetch the width with The image I used as a test image is actually online here: http://www.spiegel.de/img/0,1020,635396,00.jpg Thanks, getSizeCustomImage & getCustomSizedImageMaxSpace - sbillard - 2010-04-19 Maybe the function getSizeCustomImage & getCustomSizedImageMaxSpace - pju_photo - 2010-04-19 Indeed it did. Thanks a lot, must have been blind not to see this. |