[web-team] feedback from SVLUG website: PNG fixes

Marc MERLIN marc_news at valinux.com
Sat Aug 11 08:12:01 PDT 2001


On Wed, Aug 01, 2001 at 05:47:38PM -0700, greg.roelofs at philips.com wrote:
> The Netscape 4.x PNG problem ("may have difficulty rendering this") on
> your maps page (http://www.svlug.org/directions/cisco-9.shtml) is well-
> known and has been documented for some time:
 
Sorry, I didn't get to follow this very closely. Were you guys able to
answer him and/or use the pngs he sent us?

Marc
 
>      http://www.libpng.org/pub/png/pngapbr.html#nn
> 
> The fix is to remove the bKGD chunks from your (opaque) PNG images, or
> not to add them in the first place.  The simplest way to do the former
> is with pngcrush, for which there's a link here:
> 
>      http://www.libpng.org/pub/png/pngapcv.html
> 
> For example:
> 
>     pngcrush -d tmpdir -rem bkgd north-sj.png cisco-9-lrt-path-2001.png
>     mv tmpdir/*.png .
> 
> Before:
> 
>     File: svlug.org-north-sj.png (25161 bytes)
>       chunk IHDR at offset 0x0000c, length 13
>         390 x 245 image, 24-bit RGB, non-interlaced
>       chunk gAMA at offset 0x00025, length 4: 0.45455
>       chunk bKGD at offset 0x00035, length 6: red = 255 green = 255 blue = 255
>       chunk pHYs at offset 0x00047, length 9: 2834x2834 pixels/meter (72 dpi)
>       chunk tIME at offset 0x0005c, length 7:  1 Jun 2001 17:23:29 GMT
>       chunk IDAT at offset 0x0006f, length 8192
>         zlib:  deflated, 32K window, maximum compression
>       chunk IDAT at offset 0x0207b, length 8192
>       chunk IDAT at offset 0x04087, length 8192
>       chunk IDAT at offset 0x06093, length 418
>       chunk IEND at offset 0x06241, length 0
>     No errors detected in svlug.org-north-sj.png (91.2% compression).
> 
> After:
> 
>     File: svlug.org-north-sj-cr.png (17422 bytes)
>       chunk IHDR at offset 0x0000c, length 13
>         390 x 245 image, 24-bit RGB, non-interlaced
>       chunk gAMA at offset 0x00025, length 4: 0.45455
>       chunk tIME at offset 0x00035, length 7:  1 Jun 2001 17:23:29 GMT
>       chunk pHYs at offset 0x00048, length 9: 2834x2834 pixels/meter (72 dpi)
>       chunk IDAT at offset 0x0005d, length 17309
>         zlib:  deflated, 32K window, maximum compression
>       chunk IEND at offset 0x04406, length 0
>     No errors detected in svlug.org-north-sj-cr.png (93.9% compression).
> 
> You'll note that this also reduces their sizes by about 25-30%.  Of course,
> converting them to palette mode makes them smaller still, although it re-
> quires other tools (e.g., XV or pngtopnm/pnmtopng).  And you can shave off
> a little more also by using additional pngcrush -rem options to nuke the
> pHYs and tIME chunks, which are not especially necessary:
> 
>     File: svlug.org-north-sj-8-cr.png (14394 bytes)
>       chunk IHDR at offset 0x0000c, length 13
>         390 x 245 image, 8-bit colormap, non-interlaced
>       chunk gAMA at offset 0x00025, length 4: 0.45455
>       chunk PLTE at offset 0x00035, length 96: 32 palette entries
>       chunk IDAT at offset 0x000a1, length 14213
>         zlib:  deflated, 32K window, maximum compression
>       chunk IEND at offset 0x03832, length 0
>     No errors detected in svlug.org-north-sj-8-cr.png (84.9% compression).
> 
> For your convenience, I'll send the fixed, 8-bit images in my next two
> messages.  (I'd append them to this one, but my ancient, cheesy-but-fully-
> virus-proof mailer doesn't do MIME.  Sorry.)
> 
> Btw, if you have comments or questions, please respond to my other account
> (newt at pobox.com).  Many thanks.
> 
> Regards,
> --
> Greg Roelofs           newt at pobox.com           http://pobox.com/~newt/
> Newtware, PNG Group, Info-ZIP, Philips Semiconductors, ...
> 
> 
> 
> _______________________________________________
> web-team mailing list
> web-team at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/web-team

-- 
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
  
Home page: http://marc.merlins.org/   |   Finger marc_f at merlins.org for PGP key




More information about the web-team mailing list