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 31

    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.

  • eclrgp Member

    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.

  • eclrgp Member

    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 31

    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.

  • eclrgp Member

    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?

  • eclrgp Member

    Watermark is colour PNG with transparency

Sign In or Register to comment.