diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-07-07 20:29:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-07-07 20:29:48 +0000 |
commit | 94218b8cfe573a7996a747b6ece9c5f46f204954 (patch) | |
tree | 5526a1dcedf5c3c881af707ea9913a4e0384ae5c /gdk-pixbuf/io-wbmp.c | |
parent | 9aa5ba7fa30e877915088e16126f08fd066ff265 (diff) | |
download | gtk+-94218b8cfe573a7996a747b6ece9c5f46f204954.tar.gz |
New function for loading an image from a file either via module->load or
* gdk-pixbuf-io.c (generic_image_load): New function for loading
an image from a file either via module->load or incrementally.
(prepared_notify): ModulePreparedNotifyFunc for generic_image_load.
(gdk_pixbuf_new_from_file): Use generic_image_load.
* io-bmp.c, io-ico.c, io-ras.c, io-wbmp.c: Remove trivial
implementations of module->load. (#71266)
Diffstat (limited to 'gdk-pixbuf/io-wbmp.c')
-rw-r--r-- | gdk-pixbuf/io-wbmp.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/gdk-pixbuf/io-wbmp.c b/gdk-pixbuf/io-wbmp.c index 14bb115365..78cc24be70 100644 --- a/gdk-pixbuf/io-wbmp.c +++ b/gdk-pixbuf/io-wbmp.c @@ -75,41 +75,6 @@ static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, guint size, GError **error); - -/* Shared library entry point --> This should be removed when - generic_image_load enters gdk-pixbuf-io. */ -static GdkPixbuf *gdk_pixbuf__wbmp_image_load(FILE * f, GError **error) -{ - size_t length; - char membuf[4096]; - struct wbmp_progressive_state *State; - - GdkPixbuf *pb; - - State = gdk_pixbuf__wbmp_image_begin_load(NULL, NULL, NULL, NULL, - error); - - if (State == NULL) - return NULL; - - while (feof(f) == 0) { - length = fread(membuf, 1, 4096, f); - if (!gdk_pixbuf__wbmp_image_load_increment(State, membuf, length, - error)) { - gdk_pixbuf__wbmp_image_stop_load (State, NULL); - return NULL; - } - - } - if (State->pixbuf != NULL) - g_object_ref(State->pixbuf); - - pb = State->pixbuf; - - gdk_pixbuf__wbmp_image_stop_load(State, NULL); - return pb; -} - /* * func - called when we have pixmap created (but no image data) * user_data - passed as arg 1 to func @@ -376,7 +341,6 @@ static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, void gdk_pixbuf__wbmp_fill_vtable (GdkPixbufModule *module) { - module->load = gdk_pixbuf__wbmp_image_load; module->begin_load = gdk_pixbuf__wbmp_image_begin_load; module->stop_load = gdk_pixbuf__wbmp_image_stop_load; module->load_increment = gdk_pixbuf__wbmp_image_load_increment; |