Okular does not respect EXIF orientation tag of JPG files, displaying the images in wrong orientation.
STEPS TO REPRODUCE
1. Take some photos, but in a wrong orientation.
2. View the files using Gwenview. The photos need to be rotated.
3. Use exiftran to fix the orientation.
4. View the resulting files using Gwenview. The photos are now displayed properly because Gwenview respects EXIF orientation tag.
5. Rename the files to 001.jpg, 002.jpg, etc. and compress them into a ZIP archive.
6. Rename the archive to .cbz so that Okular can open it using the Comicbook backend.
7. View the file using Okular.
Okular does not rotate the photos according to the EXIF orientation tag.
Okular rotates the photos automatically according to the EXIF orientation tag.
Please attach some files to reproduce this issue
The test files are too big so please download them using the below link:
Also please refer to the updated steps to reproduce below:
1. A photo is taken in a wrong orientation.
2. Use exiftool (e.g. `exiftool -orientation=3 -n test.jpg`) to tag the correct orientation.
3. Observe that Gwenview displays test.jpg correctly.
4. Compress test.jpg into a ZIP archive and then rename it to .cbz.
5. Open test.cbz using Okular and observe that the image is displayed in the wrong orientation.
Ah you mean inside comicbook archives, if you open file.jpg it'll be shown correctly.
Are you ok if i use that image for an autotest so that it won't break again?
Created attachment 126518 [details]
Test files (Smaller file size)
I am attaching a new set of test files with a smaller file size - I hope these will be suitable for autotests.
Git commit 4019ec56e57624137ff11bb86920894a4fdd80d3 by Albert Astals Cid.
Committed on 04/03/2020 at 19:07.
Pushed by aacid into branch 'master'.
comicbook: Obey autotransform of images
M +15 -6 generators/comicbook/CMakeLists.txt
A +61 -0 generators/comicbook/autotests/comicbooktest.cpp [License: GPL (v2+)]
A +- -- generators/comicbook/autotests/data/rotated_cb.cbz
M +11 -2 generators/comicbook/document.cpp
M +0 -2 generators/comicbook/generator_comicbook.cpp