Re: Independent image loaders in gdk-pixbuf
- From: Jens Finke <jens triq net>
- To: Matthias Clasen <maclas gmx de>
- Cc: <gtk-devel-list gnome org>
- Subject: Re: Independent image loaders in gdk-pixbuf
- Date: Mon, 23 Sep 2002 07:44:45 +0200 (CEST)
On 22 Sep 2002, Matthias Clasen wrote:
> Here is a broad outline of the patch attached to bug 77486:
> There are no longer format-specific functions pixbuf_check_xyz inside
> libgdkpixbuf. Instead, libgdkpixbuf contains a single parameterized
> pixbuf_check_format function. The map from match patterns to
> corresponding image loader object is read from a text file,
> gdk-pixbuf.loaders. This is created by an auxiliary program,
> gdk-pixbuf-query-loaders, which queries all installed loaders for the
> necessary information. To enable this, GdkPixbufModule has acquired
> two new functions, get_name() and get_signature().
> As a side-effect of this approach, the GDK_PIXBUF_MODULEDIR
> environment variable is now only read by gdk-pixbuf-query-loaders;
> gdk-pixbuf itself inspects a new environment variable
> GDK_PIXBUF_MODULE_FILE, which can be used to override the default
> location of the gdk-pixbuf.loaders file (e.g. for uninstalled
> operation of the pixbuf demos in gtk).
>
> In order to demonstrate the usefulness of independent loaders, the
> patch also includes an svg loader based on librsvg. As mentioned
> above, this can't be included in gdk-pixbuf.
This sounds like a very good idea. Maybe we can also introduce a new
function, which dynamically returns the set of supported mime types. That
way, a program which is based on gdk-pixbuf for image loading, can present
always the full list of supported file types in the gui (e.g. the file
dialog). Even if the user installs new modules later.
Just a thought.
Regards,
Jens
--
"If the only tool you have is a hammer, you tend to treat everything as
if it were a nail" - A. Maslow -= http://triq.net/~pearl =-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]