1.6a Incorrect image orientation

The EXIF orientation value seems to be ignored by 1.6a when creating cache image. Image which needs 180 degree rotation appears upside down but with watermark in the correct orientation.
Displaying full image gives different results depending on whether GD or Imagick is being used. GD full image has same appearance but Imagick displays full image with correct orientation (but the watermark is now inverted).
I am using PHP 8.1.2 on Ubuntu 22.04

Comments

  • acrylian Administrator, Developer
    edited August 2022

    I am pretty sure there have been no changes in this area since 1.5.9 respectively even before. Note that EXIF data is not really a fixed standard so it might be that your camera fills in values off the standard. Also the graphic library especially GD must have support for rotation (setup will tell about that).

    Also try to clear the image cache regarding the watermark and have it re-created.

  • Images are displayed correctly in 1.5.9. The EXIF data does have the correct value according to exiftool. I have cleared the cache many times so make sure that difference between GD and Imagick is real.
    I have also used several browsers as other caching can confuse the result

  • acrylian Administrator, Developer

    I have checked and I really cannot find any change related to rotation of images when creating cached images… We have restructured a bit and there is a change for flipping images but not to rotating as far as I remember…

    Are you sure your GDlib can rotate? GDlib may be compiled without that capability. Re-run setup to see if there is a note.

    In your specific case for now just use Imagick then if it works I would say.

  • It looks as the code has been re-worked to create a class graphicsBase which is extended by graphicsGD and graphicsImagick.

  • acrylian Administrator, Developer
    edited August 2022

    Yes, as said restructured but not changed in functionality actually. That does not meant there is no issue. We will have to try to reproduce that. That can take a while.

  • Even using Imagick the cached image is generated without rotation but with the watermark having the correct orientation. It is only when clicking on it to display full that the image is displayed with the correct orientation but the watermark is then inverted.
    There is no note when setup is run with GD selected which says it was compiled without rotation.
    The comparison copy of Zenphoto 1.5.9 which shows the image correctly is using php 7.4

  • acrylian Administrator, Developer

    It could theoretically be an PHP 7.4 vs 8.1 issue (we have not directly tested 8.1 since our local dev environment does not have it yet), we will try to reproduce this behaviour.

    What kind of watermark are you using? PNG with colors, black&white and/or transparency?

  • Watermark is colour PNG with transparency

  • RM25 Member

    Hi everyone,
    After upgrading php7.4 to php8.2 (Debian bookworm), I'm facing the same problem with Zenphoto 1.6. My images are now not well display in the gallery (the new exif orientation looks to not be read). Purging the cache changes nothing. In the editing mode of the image, clicking on the zoom button allows to display the photo correctly.
    How could I solve this problem?

  • acrylian Administrator, Developer

    First, check if you have enabled the related meta data fields for importing.

    Second, try 1.6.1a (development build from GitHub) which has already some fixes for images rotating and flipping.

  • RM25 Member

    How can I check if I have enabled the related meta data field for importing?

    My images are in the folder albums in /var/www/zenphoto/ ; and I have changed the exif orientation with exiftool or shotwell. Something I really don't understand in my problem is which value of orientation is taking/reading by zenphoto? beacause most of my photos were already corrected by shotwell when I putted them in the albums of zenphoto.

  • acrylian Administrator, Developer

    See the image options. As said 1.6 has a bug that it does not process the orientation value correctly.

  • RM25 Member

    Thank you very much Acrylian, everything works perfectly with Zenphoto 1.6.1a.

  • acrylian Administrator, Developer

    Thanks, great it is working!

Sign In or Register to comment.