Bug 134970 - 'jpegtran -rotate 90' can cause image to 'slip'
'jpegtran -rotate 90' can cause image to 'slip'
Product: Fedora
Classification: Fedora
Component: libjpeg (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
Depends On:
  Show dependency treegraph
Reported: 2004-10-07 12:25 EDT by Tim Waugh
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-03 11:26:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
catmug1.jpg (109.74 KB, image/jpeg)
2004-10-12 10:51 EDT, Tim Waugh
no flags Details

  None (edit)
Description Tim Waugh 2004-10-07 12:25:19 EDT
Description of problem:
With some images, 'jpegtran -rotate 90' causes the resulting image to
be 'slipped' left by a few pixels, so that what should have been on
the left edge is now in the right edge, and flipped.

For example, like this:
xample, like this:e roF

Version-Release number of selected component (if applicable):
Comment 1 Matthias Clasen 2004-10-12 10:32:51 EDT
You would not happen to have an example image do demonstrate that,
would you ?
Comment 2 Tim Waugh 2004-10-12 10:51:26 EDT
Created attachment 105064 [details]

Sure, here's one.  It's already been rotated once, so you can see the effect
already.  Rotating it again produces another artifact, again on the right-hand

jpegtran -rotate 90 catmug1.jpg > rotated.jpg
Comment 3 Matthias Clasen 2004-11-03 11:26:11 EST
This is documented in the jpegtran man page:

The transpose transformation has no restrictions regarding image
dimensions.  The other transformations operate rather  oddly  if
the  image dimensions  are  not  a multiple of the iMCU size 
(usually 8 or 16 pixels), because they can only transform complete 
blocks  of  DCT  coefficient data in the desired way.

I don't think this is easily fixable short of rewriting the jpeg
transformation support completely, which I'm not up to.

Note You need to log in before you can comment on or make changes to this bug.