# Thus spake Denis Oliver Kropp ([EMAIL PROTECTED]):

> > As Sven suggested a while back I have done an image provider for imlib2.
> So the KXL games using xpm don't need to be patched ;)

if you say so ;)

> > The only problem I have is that Imlib's probe function needs the full
> > file name whereas image_probe currently only passes the head of the
> > file. dok told me on irc that he'd consider changing that but that
> > imlib's probe function should not open the complete file yet. Which
> > brings me to the problem: It does ;)
> 
> Does it "just" read the file raw data or does it decompress the image?

Actually it is a bit more complicated than that. Imlib2 keeps a list of
loaders and the file extensions they support, as well as a list of
recently used loaders for file types. So if it finds an extension, it'll
give the first loader on the later list a chance to load the file. If it
fails, the other loaders are tried, that claim to support that
extension. If there is no extension, it is wrong, or all failed up to
this point, all loaders are given a shot at loading the file and
returning whether they succeeded or not.

Now most loaders do some checking early on whether they can load a file
or not, but its ultimately up to the loader to reject a file as early as
possible. 

The above algorithm is meant to speed up finding of loaders in the case
that one is loading a lot of images of the same type, or of only two or
three types. Raster thinks that this is what you tend to do in most
cases anyway.

So the answer to the question "Does it decompress the whole file?" is
"it depends, but mostly only if it thinks it can load the file" ;)

> I will add the filename, please send a patch for DirectFB-extra after that.

Thanks, will do.

Till


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to