Re: disabling pixbuf loaders



Am Sa, den 03.07.2004 schrieb Jonathan Blandford um 18:46:
> Matthias Clasen <mclasen redhat com> writes:
> 
> > Here is what I plan to commit shortly to gdk-pixbuf HEAD,
> > the patch adds three new functions to get license information about
> > image loaders and to disable individual loaders. Doing things the
> > way I have done here means that image loaders compiled against 2.6 will
> > not be loadable by 2.4, since they will attempt to write beyond the 
> > GdkPixbufFormat struct when setting info->license. If people think that
> > we should spend the extra effort to make that working, we could add
> > a separate GdkPixbufModuleFillLicenseInfo function and set the license
> > info in that function. 
> 
> Interesting.  What's the intended use of the get_license question? Is
> it to prevent loading licenses that are incompatible?  

Yes, or rather, at least give apps the means to avoid using code which 
is incompatibly licensed. We have refused to include loaders based on 
GPL image libraries in the past, but with 3rd party loaders, apps
currently have no chance to avoid using them.

> Do we need to add
> a filter function when loading formats, or are we going to see a lot of
> code along the lines of this:
> 
> for (list = gdk_pixbuf_get_formats(); list; list = list->next)
> {
>   gchar *format;
> 
>   format = gdk_pixbuf_format_get_licence (list->data);
>   if (strcmp (format, "LGPL") ||
>       strcmp (format, "BSD"))
>     gdk_pixbuf_fromat_set_disabled (list->data, TRUE);
> 
>   g_free (format);
> }

I really want to keep "license arithmetic" out of gdk-pixbuf, but maybe
a simple filter function like this would be useful.

Matthias




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