[lug] 2.6M Lossless jpeg rotations?

Jeffrey Veiss blug at sirveiss.com
Sun Jul 20 15:24:46 MDT 2003


Hi all,

I've read that jpegtran from the v6b JPEG library is supposed to
perform "Lossless JPEG transformations" and I'm a little confused
about what that actually means.

I have a jpeg from my camera that, according to gqview, has the
following properties:

   file size:   867,475
   dimensions:  1280x960
   compression: 17.6%
   image size:  4.7MB

After rotating it with "jpegtran -rotate 270", gqview reports the
properties to now be:

   file size:   840,678
   dimensions:  960x1280
   compression: 30.4%
   image size:  2.6MB

I tried rotating the image with various other programs (gimp,
ImageMagick, xv) and as expected, the rotation adversely affected the
image.

However, I loaded the original and jpegtran-rotated image into Adobe
Photoshop and took a look at the properties of each:

Original:
	Document size:  8.889" x 6.667"
   Resolution:     144 pixels/inch

after jpegtran:
	Document size:  13.333" x 17.778"
   Resolution:     72 pixels/inch

Could anyone explain the above results?  Did jpegtran cause any quality
degradation?  I think it's interesting that Photoshop reports that the
DPI was cut in half but the Document size was doubled.  Is there a
better linux-based program (that can also be used in a script) to rotate
jpeg's without any loss of quality?

Thanks in advance!  Maybe I'll see y'all next Thursday.

Please contact me if there are any further questions via internet mail at
blug at sirveiss.com.  Thank you very much!

Jeffrey Veiss, CCNA, CISSP, TICSA             Sir Veiss, Inc.
Network Engineer/System Administrator         blug at sirveiss.com

NOTE: Any personal or contact information is not to be sold or used for
      solicitation.




More information about the LUG mailing list