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 <gu...@jpegclub.org> Date: Fri, Oct 21, 2011 at 22:11 Subject: Re: jpegtran crop/drop problem? To: Christopher Jones <short.jones.cip...@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" <nkov...@gmx.net> An: "Guido Vollbeding" <gu...@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
<<attachment: result.jpg>>
<<attachment: right (rgb 255 255 0).jpg>>
<<attachment: left (rgb 0 0 254).jpg>>
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig