Re: disabling pixbuf loaders

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?  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);


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