[Image-SIG] PIL uses obsolete JPEG decoder

Christopher Jones short.jones.cipher at gmail.com
Sat Oct 22 03:13:18 CEST 2011


PIL 1.1.7 exhibits the problem discussed below.

Guido at the Independent JPEG Group http://www.ijg.org/ recommends updating
the JPEG decoder to avoid this problem.


Christopher Jones
Sydney
Australia
http://chrisjones.id.au/


---------- Forwarded message ----------
From: Guido Vollbeding <guido at jpegclub.org>
Date: Fri, Oct 21, 2011 at 22:11
Subject: Re: jpegtran crop/drop problem?
To: Christopher Jones <short.jones.cipher at gmail.com>


Hello Chris

Thank you for the feedback.
This is a known issue.
Yes, you are right that this is only a decoding problem.
IJG decoder before v7 used an inferior method to resolve
the color subsampling which leads to the described effect.
IJG since v7 uses a new method for resolving the color
subsampling which does not have that odd effect and which
behaves as expected when joining JPEG images, not smearing
colors beyond block edges.
Unfortunately, IrfanView and many other softwares did not
update to a newer IJG release, they still use a release or
derivative which was published in 1998 (v6b) and is now
obsolete.
I recommend that you inform the authors of such software
about the problem and suggest an update to the current IJG
release which does not have this problem and which does
have many other enhancements.

Here is an earlier report about the same problem (in German)
with example images attached:

 Betreff: Re: very important question about fantastic JPEGjoin software
   Datum: Mon, 3 Sep 2007 15:17:14 +0200
     Von: "Nikolas Kovats" <nkovats at gmx.net>
      An: "Guido Vollbeding" <guido at jpegclub.org>

 Ich habe im Anhang an diese E-Mail etwas zur Demonstration vorbereitet:

 Dort sind zwei JPEGs. Beide sind 336 Pixel breit und 480 Pixel hoch, also
 auch jeweils ein vielfaches von 8 und 16. Das JPEG mit dem Namen "left"
 besteht nur aus einer einzigen Farbe, und zwar aus der Farbe RGB 0 0 254.
 Das JPEG mit dem Namen "right" besteht ebenfalls nur aus einer einzigen
 Farbe, und zwar RGB 255 255 0.

 Das dritte JPEG mit dem Namen "result" ist das Bild nach dem zusammenfügen.
 Die Größe ist korrekt (672x960) und natürlich immernoch ein vielfaches von
8
 und 16. Es sind aber jetzt vier Farben und nicht mehr zwei. Dort, wo es
 zusammengefügt ist, sind zwei neue Farben entstanden (RGB 14 15 141 und 241
 240 113). Die Farbe der aüßerten rechten Pixelspalte von "left" wurde
 verändert. Wie auch die Farbe der äußersten linken Spalte von "right".

 Kann ich das mit irgendeiner Einstellung verhindern?

 Viele Grüße
 Nick

Regards
Guido Vollbeding
Organizer Independent JPEG Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111022/98d8026e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: result.jpg
Type: image/jpeg
Size: 6131 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111022/98d8026e/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: right (rgb 255 255 0).jpg
Type: image/jpeg
Size: 1235 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111022/98d8026e/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: left (rgb 0 0 254).jpg
Type: image/jpeg
Size: 1233 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111022/98d8026e/attachment-0002.jpg>


More information about the Image-SIG mailing list