Andy writes:

>  > Perhaps I should assimilate my "LibDataType" library into GGI, under a
>  > new name like LibGFFD (generic file format detection).  Using suffixes
>  > and magic numbers, it can recognise over 400 file formats, 
>  
>  This sounds good. Will it use the /etc/magic database, or its internal 
>  methods ?
 
It has its own database, which includes the suffix information (which
/etc/magic doesn't).  Looks like this :

    type:       image/gif
    mime:       image/gif
    name:       2 '*.gif'   # .gif is sometimes used for non-GIF images
    magic:      3 0[5] == 'GIF87'
    magic:      3 0[5] == 'GIF88'   # exists ???
    magic:      3 0[5] == 'GIF89'

    type:       image/jpeg
    mime:       image/jpeg
    name:       2 '*.jpeg'
    name:       2 '*.jpg'
    name:       2 '*.jpe'
    magic:      3 0[2] & 0xff 0xfe == 0xff 0xd8 && 6[4] == 'JFIF'
    magic:      3 0[2] & 0xfe 0xff == 0xd8 0xff && 6[4] == 'JFIF'

    type:       image/tiff
    mime:       image/tiff
    name:       3 '*.tiff'
    name:       3 '*.tif'
    magic:      3 0[4] == 'MM' 0x00 0x2a
    magic:      3 0[4] == 'II' 0x2a 0x00

    type:       image/png
    # MIME ???
    name:       3 '*.png'
    magic:      3 0[8] == 0x89 'PNG' 0x0d 0x0a 0x1a 0x0a

That could change somewhat for LibGFFD (the type/mime stuff), dunno yet.

>  > Using LibGFFD, this new picture library could detect the filetype, and
>  > then look it up in the gpf.conf file to find which DLL to load to
>  > handle the image.
>  > Any interest in this approach ?
>  
>  Yeah - sounds good.

Alright.  I won't have much of time to work on it, but I should find
time to work on it regularly. 

>  Looks like we are striving to reinvent gnome :-) ...

Yeah I know...  Why stop at X ? *grin*

Cheers,
__
\/   Andrew Apted   <[EMAIL PROTECTED]>
 

Reply via email to