http://qs321.pair.com?node_id=243349


in reply to Error displaying PNGs

You need to output HTTP headers indicating a proper Content-Type for a PNG image. Before the binmode, you want something like

print "Content-type: image/x-png\n\n";
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';