Distorted Resized Images

Hi everyone,

First I would like to express my appreciation and admiration for the work you've done here! I'm a beginner web developer with just enough programming understanding to appreciate the complexity of what you do. I've had lots of fun learning how its put together to make a theme. :)

I've installed zenphoto with zenpage for my brother's 3D artwork website, and have been working on a custom theme for him. But my problem occurs even with the default zenpage theme. It's something to do with the image resizing function..

Hah, while writing this I've solved my problem! But I will quickly post what it was in case it helps you.

With the Zenpage-Default theme image.php page, some of my images would not be resized correctly, and I could see no cause why. As even with 2 seemingly identical images, one would size to my set width of 710px and the other would be 580x580...

eg:
http://pintura3d.com/website5/Aircraft/vray_merlin4.jpg.php
and
http://pintura3d.com/website5/Aircraft/vray_merlin5.jpg.php
(these links will be obsolete soon when I've uploaded the finished local site, but the full size images will still be available on the site if you want to download them for research?)

I discovered that the default zenphoto theme worked correctly, so I've substituted
printDefaultSizedImage(getImageTitle()) for
printCustomSizedImageMaxSpace(getBareImageTitle(),710,580) in image.php on my local server and it fixed it. Perhaps there is an issue with this function?

OMG, even weirder.. I just tried putting back that function to recreate the problem and it doesn't do it anymore!! But it is still doing it online so if you look soon you will see what I mean.

Sorry, for this mixed up post. I hope you get the idea!

Thanks again.

Sim

Comments

  • acrylian Administrator, Developer
    This might have been the browser cache playing tricks on you.

    Generally both functions should not distorted the images. The difference between both is that `printDefaultSizedImage` uses the default size setting set on the image options, default is that it uses the longest side as the values. If that is set to 500, images will be either 500px wider or long, depending on their orientation.

    `printCustomSizedImageMaxSpace` does not use any of the options set but needs values entered directly. It is meant to be uses with website layouts that require image to fit in a box of say 500 x 400px. So images will always be scaled to fit in that.

    If you got distortion that might also be related to settings of the html `img` or any other CSS setting of your theme. This can of course have impact on an image that actually is not really distorted.
Sign In or Register to comment.