Bug 130733 - Rotating jpeg images results in smaller file size (ie losless transformation not working)
Summary: Rotating jpeg images results in smaller file size (ie losless transformation ...
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-JPEG (show other bugs)
Version: 0.9.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-13 02:23 UTC by J. Westveer
Modified: 2022-01-18 16:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 7.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J. Westveer 2006-07-13 02:23:31 UTC
Version:           0.9.0-svn (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-1-686-smp

If I rotate an image in the image/viewer/editor, the resultant file is considerably smaller, although one would expect it to be approximantly the
same size as the original.

ie.  If I rotate this 6.3m photo 180 degrees:
 http://www.netnw.com/PICT6883.JPG

I get this 4.8m photo:
 http://www.netnw.com/PICT6883-090.JPG

If I try version 0.8.2 with the same photo I get this 4.8m photo:
 http://www.netnw.com/PICT6883-0.82.JPG

BUT, if i use jpegtran to rotate the same original photo
I get this 6.3m photo:
 http://www.netnw.com/PICT6883-jpegtran.JPG

The saving image options for jpeg are set to 100.
The kipi losless plugin is enabled.


Thanks for considering this problem.

jjw
Comment 1 Loïc Brarda 2006-07-13 10:36:04 UTC
Rotation done in the Editor is not lossless as the editor works on pixels not on the jpeg files. When you open a file the Image Editor, it is uncompressed. Every modification will be done on this uncompressed data. This data will be compressed again if you save it back as a jpeg.

The lossless plugin is only available from the main window.

Perhaps a warning could be added in the image editor to tell the users that they should use the main interface to have lossless rotation when they select a 90/180/270 angle.

Just my 2 cents.
  Loic
Comment 2 caulier.gilles 2006-07-14 09:49:21 UTC
No and No !!! The rotation is lossless in digikam editor, but the JPEG re-compression is not ! Don't confuse the vision of pixel manipulation here.

If you want transform a picture never work on JPEG format. Always use a lossless format like PNG or TIFF. This is true for gimp or photoshop !

My 10 cts €

Gilles Caulier
Comment 3 J. Westveer 2006-07-17 17:54:49 UTC
What I was seeing was perhaps related to #130798, and that problem has been identified, so this bug can be closed.

jjw