[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File I/O and Image file loading

Adrian Ratnapala wrote:

>> to do very much with this. The archive code has to handle the file
>> opening/reading while libjpeg & co handle the decoding. At least libpnm
>> fits neatly into this scheme.
>As does libjpeg.  They already have an abstract data source/sink, for justthis

I had a look at the imlib source for this. Both libjpeg and libpng provide
support for such structures, so itīs quite easy to use them in any case.
PPM loading is directly implemented in imlib (about 200 lines of code).
Other gfx file formats are not so handy, they only provide functions like
TIFF * LoadTIFF (char *filename, ...);

Another thing: I also looked at the BC++ stdio.h. Its FILE type doesnīt
provide _any_ hook for customization :(