in reply to Pixel by pixel reading of images

PPM is a standard format that is very easy to read and write. Many programs support it (e.g. ImageMagic).

If this is enough, I/O routines for it are available at Japhoto.pl!.

Cheers