[Image-SIG] problem about color about some jpeg
Cesare Leonardi
ced at bernispa.com
Tue Apr 17 09:05:51 CEST 2007
feihu_roger ha scritto:
> I had a file f.jpg. It can be corrent show by acdsee or IrfanView, but
> can not open it by IE.
>
>>>> f=Image.open('f.jpg')
>>>> f.show()
>
> The new pic is color error, please see screen_snape.jpg .
>
> f.jpg can be get from : http://farm1.static.flickr.com/174/462386397_579d1f4915_o.jpg
> (IE only see red cross)
>
> screen_snape.jpg gan be get from:http://farm1.static.flickr.com/216/462386405_d24140a4b9_o.jpg
Your images are JPEG using CMYK colorspace (normally JPEG use RGB
colorspace). It is a format that many image viewer cannot handle (in
fact IE and Firefox cannot shows them) but still used in some graphics
context.
It's known that PIL has some problems treating JPEG CMYK, as reported at
least in these thread started from me:
http://mail.python.org/pipermail/image-sig/2006-April/003862.html
http://mail.python.org/pipermail/image-sig/2007-February/004336.html
Sorry but in the meantime the web space i've used in these thread to
post some sample images and some text note, is not available to me
anymore, so the links are broken.
However, in the first thread Kevin Cazabon has posted a patch that
resolved the problem with all my images and that was accepted by PIL
developers. The problem is that the patch applied is not the same as
proposed by Kevin and the upstream version still shows problems on some
images.
If you want to try, some month ago i've verified that Kevin's patch
still applies correctly to 1.1.6.
You can rename your "JpegImagePlugin.py" to something else and
substituting it with attached one (remove "KevinPatch").
Good luck. ;-)
Cesare.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: JpegImagePlugin.KevinPatch.py
Url: http://mail.python.org/pipermail/image-sig/attachments/20070417/7fd17231/attachment.asc
More information about the Image-SIG
mailing list