summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-loader.c
diff options
context:
space:
mode:
authorMichael Fulbright <drmike@redhat.com>1999-10-29 19:27:51 +0000
committerMichael Fulbright <drmike@src.gnome.org>1999-10-29 19:27:51 +0000
commit5749f310e4783c801371e2b876eb6379720f3800 (patch)
tree458783b401bf1afbbc7c349bbd3f49bdb5ed5c92 /gdk-pixbuf/gdk-pixbuf-loader.c
parentece5ac121a0acfa50725cdae19979b80a02ae170 (diff)
downloadgtk+-5749f310e4783c801371e2b876eb6379720f3800.tar.gz
Actually load the image handler when we determine the image type.
1999-10-29 Michael Fulbright <drmike@redhat.com> * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Actually load the image handler when we determine the image type. * src/gdk-pixbuf-io.[ch] (gdk_pixbuf_load_module): Changed the previously static function load_image_handler () to a public function gdk_pixbuf_load_module (). It is needed in gdk-pixbuf-loader.c to load image handler modules. This function is different from gdk_pixbuf_get_module (), which only returns a reference to the required handler, because it actually loads the handler into memory. Both actions should possibly be combined in a convenience function since one w/o the other doesn't seem to make much sense.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index db734ef631..ddb4ad3eec 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -270,16 +270,19 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, guchar *buf, size_t count)
priv->image_module = gdk_pixbuf_get_module (priv->buf, 128);
if (priv->image_module == NULL)
return FALSE;
- else if ((priv->image_module->begin_load == NULL) ||
- (priv->image_module->stop_load == NULL) ||
- (priv->image_module->load_increment == NULL)) {
+ else if (priv->image_module->module == NULL)
+ gdk_pixbuf_load_module (priv->image_module);
+
+ if ((priv->image_module->begin_load == NULL) ||
+ (priv->image_module->stop_load == NULL) ||
+ (priv->image_module->load_increment == NULL)) {
g_warning ("module %s does not support incremental loading.\n",
priv->image_module->module_name);
return FALSE;
} else {
priv->context = (*priv->image_module->begin_load) (
gdk_pixbuf_loader_prepare, loader);
-
+
if (priv->context == NULL) {
g_warning("Failed to begin progressive load");
return FALSE;