rotating with eog does shift (wrap around) image if width or height is not a multiple of 16
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eog (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: eog
I use Ubuntu maverick 10.10 (release candidate) with eog 2.32.0-0ubuntu1.
1. resize an image to 319x479 pixels with gimp
or scan an image to 1866x1266 pixels with xsane
2. open the image in eog
3. rotate it clockwise
4. save it and close eog
5. check the image in eog or firefox
=> the image got shifted for (width modulo 16) pixels. The area that would be shifted out of the image is mirrored and inserted on the opposite side of the image.
Note for triagers: if this bug is reproducible then please consider to raise its priority! Although (widths modulo 16)!=0 are not that common, this bug might cause quite some damage. Nothing is visible while rotating or saving in eog and nautilus thumbnails are too small to see the shift clearly.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: eog 2.32.0-0ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Sat Oct 9 21:12:32 2010
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate i386 (20100928)
ProcEnviron:
LANG=de_CH.utf8
SHELL=/bin/bash
SourcePackage: eog
This is apparently a fundamental problem of lossless rotation. From the JPEG FAQ:
> In particular it is possible to do 90-degree rotations and
> flips losslessly, if the image dimensions are a multiple of the file's
> block size (typically 16x16, 16x8, or 8x8 pixels for color JPEGs).
You see the same result if you use for example the jpegtran tool, so it is not eog specific. Still, I think it is a bug as eog should warn the user and maybe offer to do a lossy rotation (i.e. reencoding) instead. I'll link a (rather old...) upstream bug about the same issue, discussions should best take place there.
BTW, if you rotate the image back, you also get your original image back ̣-- after all the rotation *is* lossless.