Re: Independent image loaders in gdk-pixbuf

> You could make this a struct, even, which might contain:
> *) mime-type (image/jpeg)
> *) format name (JPEG)
> *) common suffix(es) (jpg jpeg)
> *) description (Blah Blah....)

I'm currently working on implementing the following API:

GSList * gdk_pixbuf_get_formats (void);
GSList * gdk_pixbuf_get_writable_formats (void);
GSList * gdk_pixbuf_get_mime_types (void);
GSList * gdk_pixbuf_get_writable_mime_types (void);
GdkPixbufLoader * gdk_pixbuf_loader_new_with_mime_type (const char
    GError **error);
const gchar * gdk_pixbuf_loader_get_format (GdkPixbufLoader *loader);
const gchar * gdk_pixbuf_loader_get_mime_type (GdkPixbufLoader *loader);

Which would require the addition of one new get_mime_types() function to the
image loader SPI. The last two functions are intended to obtain the
format/mime type of 
a currently loading image. 

I have a few questions on your proposal:

a) Do you think it is ok to restrict us to one format per loader (the only
kind-of counterexample among the current loaders is the ico loader, which
loads ico and cur) ?
What I have at home allows only one format per loader.

b) Do you think it is ok to restrict us to one mime type per loader ? This
seems more
problematic, considering things like image/x-portable-{bit,any,gray,pix}map
image/bmp vs image/x-bmp vs image/x-MS-bitmap. 
What I have at home currently allows for multiple mime types. Proposals for
suitable mime types would be helpful. 

c) What use would you make of extensions and description ? The description
will be problematic from an I18N perspective - as will be error messages, btw.
How do other
loadable modules handle that ?

d)  Do you think the grouping of format name, mime type (and possible
further info)
has important advantages over my current approach of independent lists of
formats/mime types ?



Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen -
und tolle Preise absahnen!

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