Bug 153066 - Rotating JPEG images by 90° causes a strip from the top to be saved at the bottom
Summary: Rotating JPEG images by 90° causes a strip from the top to be saved at the bo...
Status: RESOLVED DUPLICATE of bug 132352
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-28 17:50 UTC by Adrien Cordonnier
Modified: 2012-10-19 13:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
495×334 JPEG image with gradient from black at top left to white at bottom right (6.45 KB, image/jpeg)
2007-11-28 18:52 UTC, Adrien Cordonnier
Details
the file after rotating with gwenview (6.69 KB, image/jpeg)
2011-06-23 17:05 UTC, Martin Koller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Cordonnier 2007-11-28 17:50:19 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages

I choose from the context menu: "Actions->Transform image->Rotate 90° clockwise" on a JPEG image, the new file has the top strip shifted at the bottom of the image (actually on the right as it has been rotated).

The same behaviour happen when the JPEG image is rotated using the Gwenview preview and saved. The preview itself displays well after rotating but the saved image displays the bug. If using Gwenview not embedded in Konqueror, the image is well rotated.

The data are not completely corrupted as the reverse bug appears when turning the image 90° counterclockwise: then the strip comes at its initial position so does the orientation and the initial image is recovered.
Comment 1 Adrien Cordonnier 2007-11-28 18:49:41 UTC
After more testing, it appears it is a Gwenview bug.

The bug affects Gwenview as well. I did not see it at first because not every JPEG images display the bug which depends of the dimension ratio. For example, there is no such bug for a 640×480 image.

Here is a 495×334 JPEG image with gradient created with the Gimp. 
  1) Open the file with Gwenview
  2) Rotate the image 90° clockwise
  3) Save (Ctrl-S): a clear strip should appear on the right side
  4) Reverse the change: rotate the image 90° counterclockwise
  5) Save: the image should appear correctly again
Comment 2 Adrien Cordonnier 2007-11-28 18:52:32 UTC
Created attachment 22237 [details]
495×334 JPEG image with gradient from black at top left to white at bottom right
Comment 3 Martin Koller 2011-06-23 17:04:13 UTC
I tested with KDE 4.6.4 and gwenview 2.6.4, Qt 4.7.3 and can still reproduce mentioned problem. I attach a screenshot after doing:

gwenview /tmp/pic.jpg
rotate-right
save
quit gwenview
gwenview /tmp/pic.jpg

A testprogram using QImage doing the rotation and save does not show this bug.
Comment 4 Martin Koller 2011-06-23 17:05:53 UTC
Created attachment 61278 [details]
the file after rotating with gwenview
Comment 5 Mark S. 2011-12-30 06:25:18 UTC
Could this bug be related to bug 132352?
Comment 6 Myriam Schweingruber 2012-01-02 21:38:56 UTC
Indeed, this is the same bug, thanks for spotting!

*** This bug has been marked as a duplicate of bug 132352 ***