in reply to How can I encode a image file by perl ?
If you need a small input-output routine you can use PPM image format. Simple I/O routines for this one are in my Japhoto.pl! script.