The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
Home Reading PNG Images PNG-Reading Demo | |
PNG-Reading DemoThe back-end code was written for libpng version 1.0.3, but it should work
with any 1.x release of the library. Later releases of libpng may add new
interfaces, but the functions used here are expected to remain available
more or less indefinitely, for backward compatibility. As for the front-end
code, two versions are currently available: one for the X Window System
The basic PNG reader has the following features: it is file-based, it reads and displays a single image and then quits, and it is concerned only with reading and decoding that image--it has nothing better to do and can afford to wait on file input/output (I/O) and other potentially slow but non-CPU-intensive tasks. In other words, its characteristics are typical of standalone image viewers, converters, and many image editors, but not of web browsers. Browsers usually read from a network, which is often extremely slow compared to disk access (for example, due to limited modem bandwidth or just congested Internet sites), and they are usually busy formatting text and decoding several images at the same time--they do have something better to do than to wait for the rest of the file to show up. I'll address these issues in Chapter 14, "Reading PNG Images Progressively", with the second demo program.
|
|
Home Reading PNG Images PNG-Reading Demo |