Michael Natterer <[EMAIL PROTECTED]> writes:
> An alternative to implementing our own vfs would be to entirely
> hide file handling from file plug-ins, for example by passing them
> already opened GIOChannels which they would use to read/write.
> It woud be easily possible to make the IO channels use some vfs
> layer and the plug-ins wouldn't even notice.
> While this would make "straightforward" file plug-ins (which just
> open, read sequentially, close) much easier to implement, it is
> problematic for plug-ins which want to seek around in the files
> a lot (like jpeg.c). GIOChannel has a seeking API, but we cannot
> guarantee that for all vfs backends we may want to use.
Unfortunately some image file libraries work directly on a file
descriptor. Only if the library provides a stream API, can the plug-in
easily be ported to use GIOChannels. We would have to evaluate if this
is the case for libjpeg, libpng, libtiff and the other major image
file libraries we are using.
Gimp-developer mailing list