Here is a proof of concept on creating PNG images with the smallest amount of CPU overhead. A good application would be an embedded web server.

This example creates an 8x8 PNG image with a 4 entry palette. Creating an RGB image is a simple matter of changing a byte in the IHDR chunk and inserting the appropriate data into the IDAT chuck.

    References used in the creation:
    [*]REC-PNG.pdf PNG magic numbers
    [*]rfc1950.pdf
    [*]rfc1951.pdf Adler-32 Code
    [*]rfc1952.pdf CRC Code
    [*]Dissected PNG Images -- Observation of zero compression

    For those interested, this was a research project for work. We're developing a web enabled controll with a 1/4 VGA LCD and touchscreen. Since PNG is legally unencumbered and the LCD uses a Palette, PNG was a logical choice.

    The Huffman encoding limits the run of raw data to 64KB(?); the simplest way around is to use multiple IDAT (I haven't tested that though).
Posted on 2002-10-06 07:18:13 by eet_1024
Good woork :alright:

It seems to be better when it supports PNG ZIP compression. :)
Posted on 2002-10-08 05:22:21 by nyam