ZenphotoCMS Forum
1.2.3 thumbs crop problem - 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: 1.2.3 thumbs crop problem (/thread-4720.html)



1.2.3 thumbs crop problem - marcov - 2009-02-20

I just upgraded a test installation from 1.2.2 to 1.2.3 and the thumbs are not cropped properly, i.e. the cropped images are distorted, as if the full image size is applied the wrong way to the 100x100 thumbs. I tried to set the image longest size (600px) to both the longest and the shortest size, in both cases the square thumb is distorted so that either the images are too wide or they are too narrow. To create the thumbs, I am using

Note that in the previous version 1.2.2 the thumbs are ok.




1.2.3 thumbs crop problem - marcov - 2009-02-21

Just to make sure, I installed 1.2.3 from scratch, the thumbs are still cropped badly.
The same theme works fine in previous versions 1.2.2 and 1.2.1




1.2.3 thumbs crop problem - bl968 - 2009-02-21

I am having the exact same problem. Please advise on a solution...




1.2.3 thumbs crop problem - acrylian - 2009-02-21

I do not see that on any of my installs. Please clear the cache and refresh the database. Also maybe try the nightly build.




1.2.3 thumbs crop problem - marcov - 2009-02-21

Acrylian, are you using the printCustomAlbumThumbImage function to test the problem? The problem appears only when using this function.




1.2.3 thumbs crop problem - acrylian - 2009-02-21

I am using that on the Zenpage project site for example. Everything as it should be and always was. I have this printCustomAlbumThumbImage(getAlbumTitle(), NULL, 235, 110, 235, 110);.




1.2.3 thumbs crop problem - marcov - 2009-02-21

Ok, further testing seems to confirm that it is the two functions printCustomAlbumThumbImage() and printCustomSizedImage() that cause the problem, depending on the number of parameters. Here are my test scenarios:

  1. If I clear the cache, then call printCustomAlbumThumbImage(getAlbumTitle(),null,100,100) and printCustomSizedImage(getAlbumTitle(),null,100,100) the images are distorted, both for the album and image thumbs.

The cache contains images named as follows:
IMG_NNNN.JPG_w100_h100.jpg (both for the album and image thumbs)

  1. If I clear the cache, then call printCustomAlbumThumbImage(getAlbumTitle(),null,100,100,100,100) and
    printCustomSizedImage(getAlbumTitle(),null,100,100,100,100) the images are cropped correctly, for the image thumbs but incorrectly for the album thumb.

The cache contains images named as follows:
IMG_NNNN.JPG_w100_h100_cw100_ch100.jpg - cropped correctly for the image thumbs, and
IMG_NNNN.JPG_w100_h100.jpg - still cropped badly for the album thumbs.

The problem is totally reproducible. I did the above tests on a clean install, clean cache each time.

So, for the image thumbs, the solution to the problem is to always call the printCustomSizedImage() function specifying all four parameters: width, height, crop width and crop height. This, however, does not fix the problem for the album thumbs generated by printCustomAlbumThumbImage().




1.2.3 thumbs crop problem - marcov - 2009-02-21

Correction to the previous post - the forum did not allow me to further edit it.

The problem can be fixed for both the album and image thumbs if the two functions are called with all four parameters: width, height, crop width and crop height.




1.2.3 thumbs crop problem - bl968 - 2009-03-04

Actually for me the problem is in the random.php to pull random images from the Gallery.

http://www.paristn.net/articles/

This is the call generating the image...

'




1.2.3 thumbs crop problem - acrylian - 2009-03-05

Try to change the code to getCustomImage(null, $width, $height, $width, $height, null, null)