in reply to Loading PNG in Perl?

Before you try to reinvent the wheel:

You might want to look at how Gtk2 loads images. See pixbufloader

muppet wrote a color snooper script that displays pixel information with the pixbuf, and shows the complexities that need to be accounted for.

Also, (and you may already know this), PNGS, come in 2 types, DirectClass and PseudoClass, where direct is true color, and pseudo allows you to define colors and store the colormap in the image. You need to handle them differently. Whether you have an alpha transparency layer must be considered too.


I'm not really a human, but I play one on earth Remember How Lucky You Are