Bug 373897 - Gwenview rolls image slightly when rotating JPEG image (some leftmost pixels are moved rightmost)
Summary: Gwenview rolls image slightly when rotating JPEG image (some leftmost pixels ...
Status: CONFIRMED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: Other (add details in bug description)
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-19 16:55 UTC by Morgan Leijström
Modified: 2025-09-05 07:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
original file scanned from a newspaper (25.66 KB, image/jpeg)
2016-12-19 16:55 UTC, Morgan Leijström
Details
rotated in gwenview and saved (25.32 KB, image/jpeg)
2016-12-19 16:56 UTC, Morgan Leijström
Details
JPEG photo where this issue occurs (1.03 MB, image/jpeg)
2021-08-01 18:52 UTC, M
Details
Original on left, rotated on right. (175.69 KB, image/jpeg)
2025-09-04 15:35 UTC, Frank Steinmetzger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Morgan Leijström 2016-12-19 16:55:52 UTC
Created attachment 102876 [details]
original file scanned from a newspaper

Running on Mageia 6 Cauldron (development)
$ gwenview --version
org.kde.gwenview 16.11.90

  Look at the attached images:
Original.jpg is original file scanned from a newspaper.
Rotated.jpg is saved from gwenview after having rotated original right.

You see the leftmost text character column is chopped off, and then added rightmost (and it looks like that part it is mirrored)
Comment 1 Morgan Leijström 2016-12-19 16:56:46 UTC
Created attachment 102877 [details]
rotated in gwenview and saved
Comment 2 Morgan Leijström 2016-12-19 17:10:27 UTC
Note: Error it is not visible in gwenview right after rotation - only when reading back the saved file, so it seem error comes when saving?
Comment 3 Morgan Leijström 2016-12-20 12:14:57 UTC
Downstream bug, Mageia: https://bugs.mageia.org/show_bug.cgi?id=19986
Comment 4 Morgan Leijström 2017-04-02 13:16:58 UTC
Still valid Gwenview Version 16.12.3
Comment 5 Morgan Leijström 2017-06-01 13:42:06 UTC
Still valid. Also tested on a fresh Mageia 6 install this morning, now on i586.
Kolourpaint and Showfoto handles the rotation OK.
Comment 6 Justin Zobel 2020-11-09 04:19:15 UTC
Confirmed on gwenview from git master, it does cut writing off and move the image data.
Comment 7 M 2021-08-01 18:52:08 UTC
Created attachment 140451 [details]
JPEG photo where this issue occurs

I believe I'm running into the same issue. When using the Rotate Left or Rotate Right buttons on certain JPEGs, the saved image has 8 pixel rows shifted to the opposite edge upon reopening. I'm using Manjaro with the optional kde-unstable repo packages, Gwenview is currently versioned at 21.04.3.r6650.gb292af50-1.

I'm attaching a photo that causes the problem on my end, see if you can reproduce it.
Comment 8 Frank Steinmetzger 2022-02-07 20:04:46 UTC
I discovered this issue in current Gwenview a while ago. I use this feature a lot when editing screenshots from my android phone. It happens often, but not for every single image I edit and I haven’t found out yet why that is.

Looking at a binary diff of an image and its rotated version, I noticed that the content is completely different. Is Gwenview actually recompressing the whole image‽ I’ve always assumed that it would only change the appropriate orientation tag, because recompression is a bad idea for jpeg in any case. :(

Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.5-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4590 CPU @ 3.30GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 9 A Linux User 2025-09-04 12:18:23 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Gwenview 25.08.0 (the latest released version)?
Comment 10 Frank Steinmetzger 2025-09-04 15:35:16 UTC
Created attachment 184717 [details]
Original on left, rotated on right.

Yes it is, I just tried it with 25.08.0 on Arch. The amount of “rolling” is actually bigger now than when I first noticed the issue.
Comment 11 Morgan Leijström 2025-09-05 07:07:21 UTC
Good you follow this up, both developer and tester!

Regarding the method to rotate, comment #8, I think id would be a good featue to add a control of weather rotation should only change the orientation tag, or actually rotate the image.

That is because I have found some applications/devices do not handle rotation tag correctly, and sometimes it is set wrong.