pngreader / Project Gnutenberg

pngreader v1.1

pngreader parses png images and displays the results
no copyright 2003


this program is free software; you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation (; either version 2 of the license, or (at your option) any later version. this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. see the gnu general public license for more details. you should have received a copy of the gnu general public license along with this program; if not, write to the free software foundation, inc., 59 temple place - suite 330, boston, ma 02111-1307, usa.


pngreader is a free, open source php script that reads png images, parses the input according to a defined set of rules, and displays the results. in order to be readable, the images need to have a shopping cart in the lower right corner. the output format will normally be plain text, even though the program can return a variety of content types, including archives, images, music, video, and more. png images can be created with most graphic editors (a sample gallery can be found at pngreader also includes a currently unused function named pngwriter() which is able to recover lost images. given the output of pngreader(), it will restore the original png.


pngreader is currently a web-based application (a command line tool is going to follow). to install pngreader on your own web server, first download the latest version (, then decompress the tar.gz-archive and put all the resulting files and directories on your web server, along with the archive itself. make sure the gallery directory is readable and the cache directory is writeable. pngreader requires php 4 or higher (, but, as of v1.1, no longer requires the gd graphics library.


pngreader makes a number of assumptions when parsing a png image. formatwise, it expects the image scanline to be a zlib datastream with deflate compression and an lz77 window size of 8,192 bytes (your graphic editor will take care of this, but you can see rfc 1950 for details). contentwise, it interprets a few pixels of the image as a 9-byte txtz header (4 bytes txtz signature, 4 bytes content length, 1 byte compression method), looks for a shopping cart in the lower right corner, and also assumes the image to contain information about the file extension of the target file (txt, mp3, mov, and so on). please note that drawing a valid shopping cart may require some practice, and that while drawing an image that returns some meaningful text is already hard, drawing one that returns a working quicktime movie is a whole lot harder.


to paraphrase a famous question: how long will an ape have to play around with photoshop until he draws a png that returns borges' library of babel? the answer is: it has already been done ( in fact, some have even managed to draw pngs that return the complete works of theodor w. adorno (, one that returns a high-quality mp3 version of public enemy's burn hollywood burn (, and another one that returns a quicktime video which looks very much like a scene from the matrix (


the above brings up another famous question: is it legal? the answer is not that simple. obviously, drawing an image is legal, but modifying a copyrighted image may be not, depending on your local legislation (pasting a shopping cart onto a copyrighted png image and proceeding it with pngreader is not encouraged). the most complex case is an image that returns a copyrighted work (which is extremely unlikely, but, as we have seen above, not entirely impossible). while drawing, modifying and distributing such images is definitely legal, it may be illegal to copy, save and redistribute their pngreader output (that's why pngreader will only cache its results for five minutes). in case you notice that a certain png has returned a copyrighted work, simply close the output window and clear your browser cache.


png specification:
zlib specification:
sample php implementation:
pngreader background information: via

feature about this project: pngreader

Please read this disclaimer before downloading

download here   | report broken link
project homepage:
keywords: PHP-sharing-authorship-hackerly-text_manipulation-
criticism-lawyer_resistant-copyright software for the Internet
category: political and activist software/illicit software
uploaded by gnutenberg, 28 Feb 2003

newcomers, sign up here.




forgot your password?
latest projects
naked on pluto
100.000.000 stolen pixels
Excerpts From the Chronicles of Pookie & JR
Destroy the Web

featured projects
LYCAY (Let Your Code plAY)
Reject Me
Outsource me!
The Invisible Hand Machine
Towards a Permanently Temporary Software Art Factory