[Clipart] The PNG problem in Windows Internet Explorer

Glenn Randers-Pehrson glennrp at comcast.net
Sun Jan 23 02:27:32 PST 2005


At 11:17 PM 1/22/2005 -0800, Jon Phillips wrote:
>Glenn Randers-Pehrson wrote:
>> At 10:08 AM 1/21/2005 -0500, Jonadab the Unsightly One wrote:
>> 
>>>Salvatore Davide Rapisarda <blackmicio at tiscali.it> writes:
>>>
>>>
>>>>The problem is that explorer ignore alpha transparency in a png
>>>>image,
>>>
>>>Didn't somebody here post a method for using a PNG-related
>>>command-line tool, pngcrunch or something like that, to fix an PNG
>>>image so that it would display more correctly on IE, without changing
>>>its appearance for standards-conformant browsers and image editors?
>>>
>>>Hang on, maybe I can dig it up...
>>>
>>>Message-Id: <3.0.6.32.20041113110721.0118ec78 at mail.comcast.net>
>>>
>>># See
>>>#                                                                                                                  
>>># http://www.graphicsmagick.org/libpng/ocal/openclipart.org.html
>>># which compares the original and the "sRGB" versions.  With Firefox
>>># they look the same, but with IE one is a lot darker than the other.
>>>#                                                                                                                  
>>># I used pngcrush to remove the gAMA chunk and add the sRGB chunk:
>>>#                                                                                                                  
>>>#   pngcrush -rem gama -srgb 1 -rem gama ocal-header.png ocal-header-sRGB.png
>>>#                                                                                                                  
>>># As a side benefit, the file is 3.5kbytes smaller.
>>>#                                                                                                                  
>>># Glenn
>> 
>> 
>> This fixes the IE bug with color-matching but not the IE bug with
>> transparency.
>> 
>> Glenn
>> 
>> 
>>>If we did this to the PNG thumbnails in the package,
>>>1.  Would it improve the appearance of the site (especially the
>>>    browse portion) in MSIE?
>>>2.  Would it have any downside, e.g., impact on other
>>>    browsers or remove wanted information from the images?
>>>
>>>It could be a little computation-intensive, but that is not a big
>>>problem if we do it just once to each batch of images as part of the
>>>release cycle.  I mean, generating the thumbnails in the first place
>>>is a bit CPU-intensive, but so what?
>
>
>Thanks for this fix. I went ahead and copied what you did to the main website. I 
>think it would be wise to process each image to thumnail in the gallery this 
>way. What do we need to move over to the server or have installed to run this app?

pngcrush itself is a single c file.  It depends on libpng and zlib.
It can be installed with the libraries statically loaded (included in
the pngcrush executable) which is porbably the simplest way.

Glenn





More information about the clipart mailing list