diff -uN gdk-pixbuf.orig/Makefile.am gdk-pixbuf/Makefile.am
--- gdk-pixbuf.orig/Makefile.am	Fri Sep  6 23:14:15 2002
+++ gdk-pixbuf/Makefile.am	Sun Sep  8 00:20:56 2002
@@ -276,6 +276,7 @@
 	gdk-pixbuf-i18n.h	\
 	gdk-pixbuf.c		\
 	gdk-pixbuf-animation.c	\
+	gdk-pixbuf-collection.c	\
 	gdk-pixbuf-data.c	\
 	gdk-pixbuf-io.c		\
 	gdk-pixbuf-loader.c	\
diff -uN gdk-pixbuf.orig/gdk-pixbuf-animation.c gdk-pixbuf/gdk-pixbuf-animation.c
--- gdk-pixbuf.orig/gdk-pixbuf-animation.c	Thu Aug 22 23:32:06 2002
+++ gdk-pixbuf/gdk-pixbuf-animation.c	Sun Sep  8 01:24:43 2002
@@ -403,6 +403,22 @@
         return GDK_PIXBUF_ANIMATION_GET_CLASS (animation)->get_iter (animation, &val);
 }
 
+/**
+ * gdk_pixbuf_animation_get_collection:
+ * @animation: a #GdkPixbufAnimation
+ * 
+ * Gets the frames of the animation.
+ * 
+ * Return value: a collection of the frames.
+ **/
+GdkPixbufCollection*
+gdk_pixbuf_animation_get_collection (GdkPixbufAnimation *animation)
+{
+        g_return_val_if_fail (GDK_IS_PIXBUF_ANIMATION (animation), NULL);
+
+        return GDK_PIXBUF_ANIMATION_GET_CLASS (animation)->get_collection (animation);
+}
+
 
 
 GType
@@ -552,6 +568,7 @@
                                                                      int                *height);
 static GdkPixbufAnimationIter* gdk_pixbuf_non_anim_get_iter         (GdkPixbufAnimation *anim,
                                                                      const GTimeVal     *start_time);
+static GdkPixbufCollection*    gdk_pixbuf_non_anim_get_collection   (GdkPixbufAnimation *anim);
 
 
 
@@ -599,6 +616,7 @@
         anim_class->get_static_image = gdk_pixbuf_non_anim_get_static_image;
         anim_class->get_size = gdk_pixbuf_non_anim_get_size;
         anim_class->get_iter = gdk_pixbuf_non_anim_get_iter;
+        anim_class->get_collection = gdk_pixbuf_non_anim_get_collection;
 }
 
 static void
@@ -674,6 +692,14 @@
         g_object_ref (iter->non_anim);
         
         return GDK_PIXBUF_ANIMATION_ITER (iter);
+}
+
+static GdkPixbufCollection*
+gdk_pixbuf_non_anim_get_collection (GdkPixbufAnimation *anim)
+{
+        GdkPixbufNonAnim *non_anim = GDK_PIXBUF_NON_ANIM (anim);
+
+        return gdk_pixbuf_non_collection_new (non_anim->pixbuf);
 }
 
 
diff -uN gdk-pixbuf.orig/gdk-pixbuf-collection.c gdk-pixbuf/gdk-pixbuf-collection.c
--- gdk-pixbuf.orig/gdk-pixbuf-collection.c	Thu Jan  1 01:00:00 1970
+++ gdk-pixbuf/gdk-pixbuf-collection.c	Sun Sep  8 01:35:36 2002
@@ -0,0 +1,387 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/* GdkPixbuf library - Simple animation support
+ *
+ * Copyright (C) 1999 The Free Software Foundation
+ *
+ * Authors: Jonathan Blandford <jrb@redhat.com>
+ *          Havoc Pennington <hp@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <errno.h>
+#include "gdk-pixbuf-private.h"
+#include "gdk-pixbuf-io.h"
+
+typedef struct _GdkPixbufNonCollection GdkPixbufNonCollection;
+typedef struct _GdkPixbufNonCollectionClass GdkPixbufNonCollectionClass;
+
+#define GDK_TYPE_PIXBUF_NON_COLLECTION		(gdk_pixbuf_non_collection_get_type ())
+#define GDK_PIXBUF_NON_COLLECTION(object)	(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_NON_COLLECTION, GdkPixbufNonCollection))
+#define GDK_IS_PIXBUF_NON_COLLECTION(object)	(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_NON_COLLECTION))
+
+/* Private part of the GdkPixbufNonCollection structure */
+struct _GdkPixbufNonCollection {
+	GdkPixbufCollection parent_instance;
+
+	GdkPixbuf *pixbuf;
+};
+
+struct _GdkPixbufNonCollectionClass {
+	GdkPixbufCollectionClass parent_class;
+};
+
+static GType gdk_pixbuf_non_collection_get_type (void) G_GNUC_CONST;
+
+GType
+gdk_pixbuf_collection_get_type (void)
+{
+	static GType object_type = 0;
+
+	if (!object_type) {
+		static const GTypeInfo object_info = {
+			sizeof (GdkPixbufCollectionClass),
+                        (GBaseInitFunc) NULL,
+                        (GBaseFinalizeFunc) NULL,
+                        (GClassInitFunc) NULL,
+                        NULL,           /* class_finalize */
+                        NULL,           /* class_data */
+                        sizeof (GdkPixbufCollection),
+                        0,              /* n_preallocs */
+                        (GInstanceInitFunc) NULL,
+                };
+                
+                object_type = g_type_register_static (G_TYPE_OBJECT,
+                                                      "GdkPixbufCollection",
+                                                      &object_info, 0);
+        }
+	
+        return object_type;
+}
+
+GdkPixbufCollection *
+gdk_pixbuf_collection_new_from_file (const char *filename,
+				     GError    **error)
+{
+	GdkPixbufCollection *collection;
+	int size;
+	FILE *f;
+	guchar buffer[128];
+	GdkPixbufModule *image_module;
+
+	g_return_val_if_fail (filename != NULL, NULL);
+
+	f = fopen (filename, "rb");
+	if (!f) {
+                g_set_error (error,
+                             G_FILE_ERROR,
+                             g_file_error_from_errno (errno),
+                             _("Failed to open file '%s': %s"),
+                             filename, g_strerror (errno));
+		return NULL;
+        }
+
+	size = fread (&buffer, 1, sizeof (buffer), f);
+	if (size == 0) {
+                g_set_error (error,
+                             GDK_PIXBUF_ERROR,
+                             GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+                             _("Image file '%s' contains no data"),
+                             filename);
+                
+		fclose (f);
+		return NULL;
+	}
+
+	image_module = _gdk_pixbuf_get_module (buffer, size, filename, error);
+	if (!image_module) {
+		fclose (f);
+		return NULL;
+	}
+
+	if (image_module->module == NULL)
+                if (!_gdk_pixbuf_load_module (image_module, error)) {
+                        fclose (f);
+                        return NULL;
+                }
+
+	if (image_module->load_collection == NULL &&
+            image_module->load_animation == NULL) {                
+		GdkPixbuf *pixbuf;
+
+		/* Keep this logic in sync with gdk_pixbuf_new_from_file() */
+		fseek (f, 0, SEEK_SET);
+		pixbuf = _gdk_pixbuf_generic_image_load (image_module, f, error);
+		fclose (f);
+
+                if (pixbuf == NULL && error != NULL && *error == NULL) {
+                        /* I don't trust these crufty longjmp()'ing image libs
+                         * to maintain proper error invariants, and I don't
+                         * want user code to segfault as a result. We need to maintain
+                         * the invariant that error gets set if NULL is returned.
+                         */
+                        
+                        g_warning ("Bug! gdk-pixbuf loader '%s' didn't set an error on failure.",
+                                   image_module->module_name);
+                        g_set_error (error,
+                                     GDK_PIXBUF_ERROR,
+                                     GDK_PIXBUF_ERROR_FAILED,
+                                     _("Failed to load image '%s': reason not known, probably a corrupt image file"),
+                                     filename);
+                }
+                
+		if (pixbuf == NULL)
+                        return NULL;
+
+                collection = gdk_pixbuf_non_collection_new (pixbuf);
+
+                g_object_unref (pixbuf);
+	} else if (image_module->load_collection == NULL) {
+		GdkPixbufAnimation *animation;
+
+		/* Keep this logic in sync with gdk_pixbuf_new_from_file() */
+		fseek (f, 0, SEEK_SET);
+		animation = (*image_module->load_animation) (f, error);
+		fclose (f);
+
+                if (animation == NULL && error != NULL && *error == NULL) {
+                        /* I don't trust these crufty longjmp()'ing image libs
+                         * to maintain proper error invariants, and I don't
+                         * want user code to segfault as a result. We need to maintain
+                         * the invariant that error gets set if NULL is returned.
+                         */
+                        
+                        g_warning ("Bug! gdk-pixbuf loader '%s' didn't set an error on failure.",
+                                   image_module->module_name);
+                        g_set_error (error,
+                                     GDK_PIXBUF_ERROR,
+                                     GDK_PIXBUF_ERROR_FAILED,
+                                     _("Failed to load image '%s': reason not known, probably a corrupt image file"),
+                                     filename);
+                }
+                
+		if (animation == NULL)
+                        return NULL;
+                
+                collection = gdk_pixbuf_animation_get_collection (animation);
+
+                g_object_unref (animation);
+        } else {
+		fseek (f, 0, SEEK_SET);
+
+		collection = (*image_module->load_collection) (f, error);
+		
+                if (collection == NULL && error != NULL && *error == NULL) {
+                        /* I don't trust these crufty longjmp()'ing
+                         * image libs to maintain proper error
+                         * invariants, and I don't want user code to
+                         * segfault as a result. We need to maintain
+                         * the invariant that error gets set if NULL
+                         * is returned.
+                         */
+                        
+                        g_warning ("Bug! gdk-pixbuf loader '%s' didn't set an error on failure.",
+                                   image_module->module_name);
+                        g_set_error (error,
+                                     GDK_PIXBUF_ERROR,
+                                     GDK_PIXBUF_ERROR_FAILED,
+                                     _("Failed to load collection '%s': reason not known, probably a corrupt file"),
+                                     filename);
+                }
+                
+		fclose (f);
+	}
+
+	return collection;
+}
+
+int
+gdk_pixbuf_collection_get_length (GdkPixbufCollection *collection)
+{
+	g_return_val_if_fail (GDK_IS_PIXBUF_COLLECTION (collection), -1);
+
+	return GDK_PIXBUF_COLLECTION_GET_CLASS (collection)->get_length (collection);
+}
+
+GdkPixbuf *
+gdk_pixbuf_collection_get_pixbuf (GdkPixbufCollection *collection,
+				  int                  i)
+{
+	g_return_val_if_fail (i >= 0, NULL);
+	g_return_val_if_fail (i < gdk_pixbuf_collection_get_length (collection), NULL);
+
+	return GDK_PIXBUF_COLLECTION_GET_CLASS (collection)->get_pixbuf (collection, i);
+}
+
+gint
+gdk_pixbuf_collection_get_pixbuf_width (GdkPixbufCollection *collection,
+					int                  i)
+{
+	g_return_val_if_fail (i >= 0, -1);
+	g_return_val_if_fail (i < gdk_pixbuf_collection_get_length (collection), -1);
+
+	return GDK_PIXBUF_COLLECTION_GET_CLASS (collection)->get_pixbuf_width (collection, i);
+}
+
+gint
+gdk_pixbuf_collection_get_pixbuf_height (GdkPixbufCollection *collection,
+					 int                  i)
+{
+	g_return_val_if_fail (i >= 0, -1);
+	g_return_val_if_fail (i < gdk_pixbuf_collection_get_length (collection), -1);
+
+	return GDK_PIXBUF_COLLECTION_GET_CLASS (collection)->get_pixbuf_height (collection, i);
+}
+
+gint
+gdk_pixbuf_collection_get_pixbuf_bpp (GdkPixbufCollection *collection,
+				      int                  i)
+{
+	g_return_val_if_fail (i >= 0, -1);
+	g_return_val_if_fail (i < gdk_pixbuf_collection_get_length (collection), -1);
+	
+	return GDK_PIXBUF_COLLECTION_GET_CLASS (collection)->get_pixbuf_bpp (collection, i);
+}
+
+static void       gdk_pixbuf_non_collection_class_init        (GdkPixbufNonCollectionClass *klass);
+static void       gdk_pixbuf_non_collection_finalize          (GObject                     *gobject);
+static gint       gdk_pixbuf_non_collection_get_length        (GdkPixbufCollection         *collection);
+static GdkPixbuf *gdk_pixbuf_non_collection_get_pixbuf        (GdkPixbufCollection         *collection,
+							       int                          i);
+static gint       gdk_pixbuf_non_collection_get_pixbuf_height (GdkPixbufCollection         *collection,
+							       int                          i);
+static gint       gdk_pixbuf_non_collection_get_pixbuf_width  (GdkPixbufCollection         *collection,
+							       int                          i);
+static gint       gdk_pixbuf_non_collection_get_pixbuf_bpp    (GdkPixbufCollection         *collection,
+							       int                          i);
+
+
+static gpointer non_parent_class;
+
+GType
+gdk_pixbuf_non_collection_get_type (void)
+{
+	static GType object_type = 0;
+
+	if (!object_type) {
+		static const GTypeInfo object_info = {
+			sizeof (GdkPixbufNonCollectionClass),
+			(GBaseInitFunc) NULL,
+                        (GBaseFinalizeFunc) NULL,
+                        (GClassInitFunc) gdk_pixbuf_non_collection_class_init,
+                        NULL,           /* class_finalize */
+                        NULL,           /* class_data */
+                        sizeof (GdkPixbufNonCollection),
+                        0,              /* n_preallocs */
+                        (GInstanceInitFunc) NULL,
+                };
+                
+                object_type = g_type_register_static (GDK_TYPE_PIXBUF_COLLECTION,
+                                                      "GdkPixbufNonCollection",
+                                                      &object_info, 0);
+        }
+        
+        return object_type;
+}
+			
+static void
+gdk_pixbuf_non_collection_class_init (GdkPixbufNonCollectionClass *klass)
+{
+        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+        GdkPixbufCollectionClass *collection_class = GDK_PIXBUF_COLLECTION_CLASS (klass);
+        
+        non_parent_class = g_type_class_peek_parent (klass);
+
+        object_class->finalize = gdk_pixbuf_non_collection_finalize;
+
+	collection_class->get_length = gdk_pixbuf_non_collection_get_length;
+	collection_class->get_pixbuf = gdk_pixbuf_non_collection_get_pixbuf;
+	collection_class->get_pixbuf_width = gdk_pixbuf_non_collection_get_pixbuf_width;
+	collection_class->get_pixbuf_height = gdk_pixbuf_non_collection_get_pixbuf_height;
+	collection_class->get_pixbuf_bpp = gdk_pixbuf_non_collection_get_pixbuf_bpp;
+}
+
+static void
+gdk_pixbuf_non_collection_finalize (GObject *object)
+{
+	GdkPixbufNonCollection *non_collection = GDK_PIXBUF_NON_COLLECTION (object);
+
+	if (non_collection->pixbuf)
+		g_object_unref (non_collection->pixbuf);
+
+	G_OBJECT_CLASS (non_parent_class)->finalize (object);
+}
+
+static gint
+gdk_pixbuf_non_collection_get_length (GdkPixbufCollection *collection)
+{
+	if (GDK_PIXBUF_NON_COLLECTION (collection)->pixbuf)
+		return 1;
+	else
+		return 0;
+}
+
+static gint
+gdk_pixbuf_non_collection_get_pixbuf_width (GdkPixbufCollection *collection,
+					     int                  i)
+{
+	return gdk_pixbuf_get_width (GDK_PIXBUF_NON_COLLECTION (collection)->pixbuf);
+}
+
+static gint
+gdk_pixbuf_non_collection_get_pixbuf_height (GdkPixbufCollection *collection,
+					     int                  i)
+{
+	return gdk_pixbuf_get_height (GDK_PIXBUF_NON_COLLECTION (collection)->pixbuf);
+}
+
+static gint
+gdk_pixbuf_non_collection_get_pixbuf_bpp (GdkPixbufCollection *collection,
+					  int                  i)
+{
+	GdkPixbufNonCollection *non_collection = GDK_PIXBUF_NON_COLLECTION (collection);
+	
+	return gdk_pixbuf_get_bits_per_sample (non_collection->pixbuf) *
+		(gdk_pixbuf_get_has_alpha (non_collection->pixbuf) ? 4 : 3);
+}
+
+static GdkPixbuf *
+gdk_pixbuf_non_collection_get_pixbuf (GdkPixbufCollection *collection,
+				      int                  i)
+{
+	GdkPixbufNonCollection *non_collection = GDK_PIXBUF_NON_COLLECTION (collection);
+
+	return non_collection->pixbuf;
+}
+
+
+GdkPixbufCollection *
+gdk_pixbuf_non_collection_new (GdkPixbuf *pixbuf)
+{
+	GdkPixbufNonCollection *non_collection;
+
+	non_collection = g_object_new (GDK_TYPE_PIXBUF_NON_COLLECTION, NULL);
+
+	non_collection->pixbuf = pixbuf;
+	if (pixbuf)
+		g_object_ref (pixbuf);
+
+	return GDK_PIXBUF_COLLECTION (non_collection);
+}
+
+
diff -uN gdk-pixbuf.orig/gdk-pixbuf-io.c gdk-pixbuf/gdk-pixbuf-io.c
--- gdk-pixbuf.orig/gdk-pixbuf-io.c	Fri Sep  6 23:14:15 2002
+++ gdk-pixbuf/gdk-pixbuf-io.c	Sun Sep  8 02:36:09 2002
@@ -583,6 +583,7 @@
 static void
 prepared_notify (GdkPixbuf *pixbuf, 
 		 GdkPixbufAnimation *anim, 
+		 GdkPixbufCollection *coll, 
 		 gpointer user_data)
 {
 	if (pixbuf != NULL)
diff -uN gdk-pixbuf.orig/gdk-pixbuf-io.h gdk-pixbuf/gdk-pixbuf-io.h
--- gdk-pixbuf.orig/gdk-pixbuf-io.h	Thu Aug 22 23:32:06 2002
+++ gdk-pixbuf/gdk-pixbuf-io.h	Sun Sep  8 02:35:15 2002
@@ -43,6 +43,7 @@
 
 typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf          *pixbuf,
                                            GdkPixbufAnimation *anim,
+                                           GdkPixbufCollection *coll,
                                            gpointer            user_data);
 typedef void (* ModuleUpdatedNotifyFunc)  (GdkPixbuf *pixbuf,
                                            int        x,
@@ -78,6 +79,9 @@
 	GdkPixbufAnimation *(* load_animation) (FILE    *f,
                                                 GError **error);
 
+	/* Collection loading */
+	GdkPixbufCollection *(* load_collection) (FILE    *f,
+						  GError **error);
         gboolean (* save) (FILE      *f,
                            GdkPixbuf *pixbuf,
                            gchar    **param_keys,
@@ -94,6 +98,10 @@
                                                GError **error);
 gboolean _gdk_pixbuf_load_module (GdkPixbufModule *image_module,
                                   GError **error);
+
+GdkPixbuf *_gdk_pixbuf_generic_image_load (GdkPixbufModule *module,
+					   FILE *f,
+					   GError **error);
 
 GdkPixbuf *_gdk_pixbuf_generic_image_load (GdkPixbufModule *image_module,
 					   FILE *f,
diff -uN gdk-pixbuf.orig/gdk-pixbuf-loader.c gdk-pixbuf/gdk-pixbuf-loader.c
--- gdk-pixbuf.orig/gdk-pixbuf-loader.c	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/gdk-pixbuf-loader.c	Sun Sep  8 02:44:11 2002
@@ -54,6 +54,7 @@
 typedef struct
 {
   GdkPixbufAnimation *animation;
+  GdkPixbufCollection *collection;
   gboolean closed;
   guchar header_buf[LOADER_HEADER_SIZE];
   gint header_buf_offset;
@@ -181,6 +182,9 @@
   if (priv->animation)
     g_object_unref (priv->animation);
   
+  if (priv->collection)
+    g_object_unref (priv->collection);
+  
   g_free (priv);
   
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -235,6 +239,7 @@
 static void
 gdk_pixbuf_loader_prepare (GdkPixbuf          *pixbuf,
                            GdkPixbufAnimation *anim,
+                           GdkPixbufCollection *coll,
 			   gpointer            loader)
 {
   GdkPixbufLoaderPrivate *priv = GDK_PIXBUF_LOADER (loader)->priv;
@@ -258,9 +263,14 @@
     g_object_ref (anim);
   else
     anim = gdk_pixbuf_non_anim_new (pixbuf);
-  
   priv->animation = anim;
-  
+
+  if (coll)
+    g_object_ref (coll);
+  else
+    coll = gdk_pixbuf_animation_get_collection (anim);
+  priv->collection = coll;  
+
   if (!priv->needs_scale)
     g_signal_emit (loader, pixbuf_loader_signals[AREA_PREPARED], 0);
 }
@@ -274,7 +284,7 @@
 			  gpointer   loader)
 {
   GdkPixbufLoaderPrivate *priv = GDK_PIXBUF_LOADER (loader)->priv;
-  
+
   if (!priv->needs_scale)
     g_signal_emit (loader,
 		   pixbuf_loader_signals[AREA_UPDATED],
@@ -568,6 +578,33 @@
   return priv->animation;
 }
 
+
+/**
+ * gdk_pixbuf_loader_get_collection:
+ * @loader: A pixbuf loader
+ *
+ * Queries the #GdkPixbufCollection that a pixbuf loader is currently creating.
+ * In general it only makes sense to call this function after the "area_prepared"
+ * signal has been emitted by the loader. If the loader doesn't have enough
+ * bytes yet (hasn't emitted the "area_prepared" signal) this function will 
+ * return %NULL.
+ *
+ * Return value: The #GdkPixbufCollection that the loader is loading, or %NULL if
+ not enough data has been read to determine the information.
+**/
+GdkPixbufCollection *
+gdk_pixbuf_loader_get_collection (GdkPixbufLoader *loader)
+{
+  GdkPixbufLoaderPrivate *priv;
+  
+  g_return_val_if_fail (loader != NULL, NULL);
+  g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL);
+  
+  priv = loader->priv;
+  
+  return priv->collection;
+}
+
 /**
  * gdk_pixbuf_loader_close:
  * @loader: A pixbuf loader.
@@ -624,6 +661,7 @@
     GdkPixbuf *tmp, *pixbuf;
 
     tmp = gdk_pixbuf_animation_get_static_image (priv->animation);
+
     g_object_ref (tmp);
     pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, tmp->has_alpha, 8, priv->width, priv->height);
     g_object_unref (priv->animation);
@@ -644,6 +682,7 @@
 
   return retval;
 }
+
 
 
 
diff -uN gdk-pixbuf.orig/gdk-pixbuf-loader.h gdk-pixbuf/gdk-pixbuf-loader.h
--- gdk-pixbuf.orig/gdk-pixbuf-loader.h	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/gdk-pixbuf-loader.h	Sun Sep  8 02:36:47 2002
@@ -79,6 +79,7 @@
                                                       GError         **error);
 GdkPixbuf *          gdk_pixbuf_loader_get_pixbuf    (GdkPixbufLoader *loader);
 GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
+GdkPixbufCollection* gdk_pixbuf_loader_get_collection(GdkPixbufLoader *loader);
 gboolean             gdk_pixbuf_loader_close         (GdkPixbufLoader *loader,
                                                       GError         **error);
diff -uN gdk-pixbuf.orig/gdk-pixbuf-private.h gdk-pixbuf/gdk-pixbuf-private.h
--- gdk-pixbuf.orig/gdk-pixbuf-private.h	Fri Oct  5 20:51:47 2001
+++ gdk-pixbuf/gdk-pixbuf-private.h	Sun Sep  8 00:33:47 2002
@@ -100,6 +100,8 @@
         GdkPixbufAnimationIter* (*get_iter) (GdkPixbufAnimation *anim,
                                              const GTimeVal     *start_time);
 
+        GdkPixbufCollection*    (*get_collection) (GdkPixbufAnimation *anim);
+
 };
 
 
@@ -131,8 +133,36 @@
 
 GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf);
 
+typedef struct _GdkPixbufCollectionClass GdkPixbufCollectionClass;
+
+#define GDK_PIXBUF_COLLECTION_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_COLLECTION, GdkPixbufCollectionClass))
+#define GDK_IS_PIXBUF_COLLECTION_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_COLLECTION))
+#define GDK_PIXBUF_COLLECTION_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_COLLECTION, GdkPixbufCollectionClass))
+
+/* Private part of the GdkPixbufCollection structure */
+struct _GdkPixbufCollection {
+        GObject parent_instance;
+};
+
+struct _GdkPixbufCollectionClass {
+        GObjectClass parent_class;
+
+        gint       (* get_length)        (GdkPixbufCollection *collection);
+        GdkPixbuf *(* get_pixbuf)        (GdkPixbufCollection *collection,
+                                          int                  i);
+        gint       (* get_pixbuf_width)  (GdkPixbufCollection *collection,
+                                          int                  i);
+        gint       (* get_pixbuf_height) (GdkPixbufCollection *collection,
+                                          int                  i);
+        gint       (* get_pixbuf_bpp)    (GdkPixbufCollection *collection,
+                                          int                  i);
+};
+
+GdkPixbufCollection *gdk_pixbuf_non_collection_new (GdkPixbuf *pixbuf);
+
 
 
+        
 /*  key/value pairs that can be attached by the pixbuf loader  */
 
 gboolean gdk_pixbuf_set_option  (GdkPixbuf   *pixbuf,
diff -uN gdk-pixbuf.orig/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf.h
--- gdk-pixbuf.orig/gdk-pixbuf.h	Wed Jan  9 17:36:20 2002
+++ gdk-pixbuf/gdk-pixbuf.h	Sun Sep  8 01:23:01 2002
@@ -53,6 +53,7 @@
 typedef struct _GdkPixbuf GdkPixbuf;
 typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
 typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
+typedef struct _GdkPixbufCollection GdkPixbufCollection;
 typedef struct _GdkPixbufFrame GdkPixbufFrame;
 
 #define GDK_TYPE_PIXBUF              (gdk_pixbuf_get_type ())
@@ -67,6 +68,10 @@
 #define GDK_PIXBUF_ANIMATION_ITER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
 #define GDK_IS_PIXBUF_ANIMATION_ITER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER))
 
+#define GDK_TYPE_PIXBUF_COLLECTION		(gdk_pixbuf_collection_get_type ())
+#define GDK_PIXBUF_COLLECTION(object)		(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_COLLECTION, GdkPixbufCollection))
+#define GDK_IS_PIXBUF_COLLECTION(object)	(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_COLLECTION))
+
 /* Handler that must free the pixel array */
 typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data);
 
@@ -274,6 +279,7 @@
 
 GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter                        (GdkPixbufAnimation     *animation,
                                                                               const GTimeVal         *start_time);
+GdkPixbufCollection *gdk_pixbuf_animation_get_collection (GdkPixbufAnimation *animation);
 GType                   gdk_pixbuf_animation_iter_get_type                   (void) G_GNUC_CONST;
 int                     gdk_pixbuf_animation_iter_get_delay_time             (GdkPixbufAnimationIter *iter);
 GdkPixbuf              *gdk_pixbuf_animation_iter_get_pixbuf                 (GdkPixbufAnimationIter *iter);
@@ -281,6 +287,23 @@
 gboolean                gdk_pixbuf_animation_iter_advance                    (GdkPixbufAnimationIter *iter,
                                                                               const GTimeVal         *current_time);
 
+
+/* Collection support */
+
+GType                 gdk_pixbuf_collection_get_type      (void) G_GNUC_CONST;
+
+GdkPixbufCollection * gdk_pixbuf_collection_new_from_file (const char          *filename,
+							   GError             **error);
+
+int                   gdk_pixbuf_collection_get_length        (GdkPixbufCollection *collection);
+GdkPixbuf           * gdk_pixbuf_collection_get_pixbuf        (GdkPixbufCollection *collection,
+							       int                  i);
+gint                  gdk_pixbuf_collection_get_pixbuf_width  (GdkPixbufCollection *collection,
+							       int                  i);
+gint                  gdk_pixbuf_collection_get_pixbuf_height (GdkPixbufCollection *collection,
+							       int                  i);
+gint                  gdk_pixbuf_collection_get_pixbuf_bpp    (GdkPixbufCollection *collection,
+							       int                  i);
 
 
 
diff -uN gdk-pixbuf.orig/io-ani-animation.c gdk-pixbuf/io-ani-animation.c
--- gdk-pixbuf.orig/io-ani-animation.c	Fri Sep  6 23:14:15 2002
+++ gdk-pixbuf/io-ani-animation.c	Sun Sep  8 01:26:26 2002
@@ -37,6 +37,7 @@
                                                              int                *height);
 static GdkPixbufAnimationIter* gdk_pixbuf_ani_anim_get_iter (GdkPixbufAnimation *anim,
                                                              const GTimeVal     *start_time);
+static GdkPixbufCollection* gdk_pixbuf_ani_anim_get_collection (GdkPixbufAnimation *anim);
 
 
 
@@ -83,6 +84,7 @@
         anim_class->get_static_image = gdk_pixbuf_ani_anim_get_static_image;
         anim_class->get_size = gdk_pixbuf_ani_anim_get_size;
         anim_class->get_iter = gdk_pixbuf_ani_anim_get_iter;
+        anim_class->get_collection = gdk_pixbuf_ani_anim_get_collection;
 }
 
 static void
@@ -170,6 +172,20 @@
         return GDK_PIXBUF_ANIMATION_ITER (iter);
 }
 
+static GdkPixbufCollection*
+gdk_pixbuf_ani_anim_get_collection (GdkPixbufAnimation *anim)
+{
+        GdkPixbufAniCollection *collection;
+
+        collection = g_object_new (GDK_TYPE_PIXBUF_ANI_COLLECTION, NULL);
+
+        collection->ani_anim = GDK_PIXBUF_ANI_ANIM (anim);
+
+        g_object_ref (collection->ani_anim);
+        
+        return GDK_PIXBUF_COLLECTION (collection);
+}
+
 
 
 static void gdk_pixbuf_ani_anim_iter_class_init (GdkPixbufAniAnimIterClass *klass);
@@ -336,12 +352,119 @@
         return FALSE;
 }
 
+static void gdk_pixbuf_ani_collection_class_init (GdkPixbufAniCollectionClass *klass);
+static void gdk_pixbuf_ani_collection_finalize   (GObject                   *object);
+static gint gdk_pixbuf_ani_collection_get_length (GdkPixbufCollection *collection);
+static GdkPixbuf *gdk_pixbuf_ani_collection_get_pixbuf (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_ani_collection_get_pixbuf_width (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_ani_collection_get_pixbuf_height (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_ani_collection_get_pixbuf_bpp (GdkPixbufCollection *collection, int i);
+
+
+static gpointer collection_parent_class;
+
+GType
+gdk_pixbuf_ani_collection_get_type (void)
+{
+        static GType object_type = 0;
+
+        if (!object_type) {
+                static const GTypeInfo object_info = {
+                        sizeof (GdkPixbufAniCollectionClass),
+                        (GBaseInitFunc) NULL,
+                        (GBaseFinalizeFunc) NULL,
+                        (GClassInitFunc) gdk_pixbuf_ani_collection_class_init,
+                        NULL,           /* class_finalize */
+                        NULL,           /* class_data */
+                        sizeof (GdkPixbufAniCollection),
+                        0,              /* n_preallocs */
+                        (GInstanceInitFunc) NULL,
+                };
+                
+                object_type = g_type_register_static (GDK_TYPE_PIXBUF_COLLECTION,
+                                                      "GdkPixbufAniCollection",
+                                                      &object_info, 0);
+        }
+        
+        return object_type;
+}
+
+static void
+gdk_pixbuf_ani_collection_class_init (GdkPixbufAniCollectionClass *klass)
+{
+        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+        GdkPixbufCollectionClass *collection_class =
+                GDK_PIXBUF_COLLECTION_CLASS (klass);
+        
+        collection_parent_class = g_type_class_peek_parent (klass);
+        
+        object_class->finalize = gdk_pixbuf_ani_collection_finalize;
+
+        collection_class->get_length = gdk_pixbuf_ani_collection_get_length;
+        collection_class->get_pixbuf = gdk_pixbuf_ani_collection_get_pixbuf;
+        collection_class->get_pixbuf_width = gdk_pixbuf_ani_collection_get_pixbuf_width;
+        collection_class->get_pixbuf_height = gdk_pixbuf_ani_collection_get_pixbuf_height;
+        collection_class->get_pixbuf_bpp = gdk_pixbuf_ani_collection_get_pixbuf_bpp;
+}
+
+static void
+gdk_pixbuf_ani_collection_finalize (GObject *object)
+{
+        GdkPixbufAniCollection *coll = GDK_PIXBUF_ANI_COLLECTION (object);
 
+        g_object_unref (coll->ani_anim);
+        
+        G_OBJECT_CLASS (collection_parent_class)->finalize (object);
+}
 
+static gint 
+gdk_pixbuf_ani_collection_get_length (GdkPixbufCollection *collection)
+{
+        GdkPixbufAniCollection *coll = GDK_PIXBUF_ANI_COLLECTION (collection);
 
+        return coll->ani_anim->n_frames;
+}
 
+static GdkPixbuf *
+gdk_pixbuf_ani_collection_get_pixbuf (GdkPixbufCollection *collection, int i)
+{
+        int k;
+        GdkPixbufAniCollection *coll = GDK_PIXBUF_ANI_COLLECTION (collection);
 
+        k = coll->ani_anim->sequence[i];
 
+        /* this is necessary if the animation is displayed while loading */
+        while (k > 0 && !coll->ani_anim->pixbufs[k])
+                k--;
 
+        return coll->ani_anim->pixbufs[k];
+}
+
+static gint gdk_pixbuf_ani_collection_get_pixbuf_width (GdkPixbufCollection *collection, int i) 
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_ani_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_width (pixbuf);
+}
+
+static gint gdk_pixbuf_ani_collection_get_pixbuf_height (GdkPixbufCollection *collection, int i)
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_ani_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_height (pixbuf);
+}
+
+static gint gdk_pixbuf_ani_collection_get_pixbuf_bpp (GdkPixbufCollection *collection, int i)
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_ani_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_bits_per_sample (pixbuf) * gdk_pixbuf_get_n_channels (pixbuf);
+}
 
 
diff -uN gdk-pixbuf.orig/io-ani-animation.h gdk-pixbuf/io-ani-animation.h
--- gdk-pixbuf.orig/io-ani-animation.h	Fri Sep  6 23:14:15 2002
+++ gdk-pixbuf/io-ani-animation.h	Sun Sep  8 01:38:34 2002
@@ -109,4 +109,29 @@
 
 GType gdk_pixbuf_ani_anim_iter_get_type (void) G_GNUC_CONST;
 
+
+
+typedef struct _GdkPixbufAniCollection GdkPixbufAniCollection;
+typedef struct _GdkPixbufAniCollectionClass GdkPixbufAniCollectionClass;
+
+#define GDK_TYPE_PIXBUF_ANI_COLLECTION              (gdk_pixbuf_ani_collection_get_type ())
+#define GDK_PIXBUF_ANI_COLLECTION(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANI_COLLECTION, GdkPixbufAniCollection))
+#define GDK_IS_PIXBUF_ANI_COLLECTION(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANI_COLLECTION))
+
+#define GDK_PIXBUF_ANI_COLLECTION_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANI_COLLECTION, GdkPixbufAniCollectionClass))
+#define GDK_IS_PIXBUF_ANI_COLLECTION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANI_COLLECTION))
+#define GDK_PIXBUF_ANI_COLLECTION_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANI_COLLECTION, GdkPixbufAniCollectionClass))
+
+struct _GdkPixbufAniCollection {
+        GdkPixbufCollection parent_instance;
+        
+        GdkPixbufAniAnim   *ani_anim;
+};
+
+struct _GdkPixbufAniCollectionClass {
+        GdkPixbufCollectionClass parent_class;
+};
+
+GType gdk_pixbuf_ani_collection_get_type (void) G_GNUC_CONST;
+
 #endif
diff -uN gdk-pixbuf.orig/io-ani.c gdk-pixbuf/io-ani.c
--- gdk-pixbuf.orig/io-ani.c	Fri Sep  6 23:14:15 2002
+++ gdk-pixbuf/io-ani.c	Sun Sep  8 02:45:54 2002
@@ -167,6 +167,7 @@
 		if (context->prepared_func)
 			(* context->prepared_func) (pixbuf, 
 						    GDK_PIXBUF_ANIMATION (context->animation), 
+						    NULL,
 						    context->user_data);
 	}
 	else {
diff -uN gdk-pixbuf.orig/io-bmp.c gdk-pixbuf/io-bmp.c
--- gdk-pixbuf.orig/io-bmp.c	Wed Sep  4 01:43:21 2002
+++ gdk-pixbuf/io-bmp.c	Sun Sep  8 02:45:21 2002
@@ -342,7 +342,7 @@
 
 		if (State->prepared_func != NULL)
 			/* Notify the client that we are ready to go */
-			(*State->prepared_func) (State->pixbuf, NULL, State->user_data);
+			(*State->prepared_func) (State->pixbuf, NULL, NULL, State->user_data);
 
 	}
 	
diff -uN gdk-pixbuf.orig/io-gif-animation.c gdk-pixbuf/io-gif-animation.c
--- gdk-pixbuf.orig/io-gif-animation.c	Thu Dec 13 22:22:11 2001
+++ gdk-pixbuf/io-gif-animation.c	Sun Sep  8 01:25:30 2002
@@ -40,6 +40,8 @@
 static GdkPixbufAnimationIter* gdk_pixbuf_gif_anim_get_iter (GdkPixbufAnimation *anim,
                                                              const GTimeVal     *start_time);
 
+static GdkPixbufCollection* gdk_pixbuf_gif_anim_get_collection (GdkPixbufAnimation *anim);
+
 
 
 
@@ -85,6 +87,7 @@
         anim_class->get_static_image = gdk_pixbuf_gif_anim_get_static_image;
         anim_class->get_size = gdk_pixbuf_gif_anim_get_size;
         anim_class->get_iter = gdk_pixbuf_gif_anim_get_iter;
+        anim_class->get_collection = gdk_pixbuf_gif_anim_get_collection;
 }
 
 static void
@@ -185,6 +188,20 @@
         return GDK_PIXBUF_ANIMATION_ITER (iter);
 }
 
+static GdkPixbufCollection*
+gdk_pixbuf_gif_anim_get_collection (GdkPixbufAnimation *anim)
+{
+        GdkPixbufGifCollection *collection;
+
+        collection = g_object_new (GDK_TYPE_PIXBUF_GIF_COLLECTION, NULL);
+
+        collection->gif_anim = GDK_PIXBUF_GIF_ANIM (anim);
+
+        g_object_ref (collection->gif_anim);
+        
+        return GDK_PIXBUF_COLLECTION (collection);
+}
+
 
 
 static void gdk_pixbuf_gif_anim_iter_class_init (GdkPixbufGifAnimIterClass *klass);
@@ -555,3 +572,125 @@
 
         return iter->current_frame == NULL || iter->current_frame->next == NULL;  
 }
+
+
+static void gdk_pixbuf_gif_collection_class_init (GdkPixbufGifCollectionClass *klass);
+static void gdk_pixbuf_gif_collection_finalize   (GObject                   *object);
+static gint gdk_pixbuf_gif_collection_get_length (GdkPixbufCollection *collection);
+static GdkPixbuf *gdk_pixbuf_gif_collection_get_pixbuf (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_gif_collection_get_pixbuf_width (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_gif_collection_get_pixbuf_height (GdkPixbufCollection *collection, int i);
+static gint gdk_pixbuf_gif_collection_get_pixbuf_bpp (GdkPixbufCollection *collection, int i);
+
+
+static gpointer collection_parent_class;
+
+GType
+gdk_pixbuf_gif_collection_get_type (void)
+{
+        static GType object_type = 0;
+
+        if (!object_type) {
+                static const GTypeInfo object_info = {
+                        sizeof (GdkPixbufGifCollectionClass),
+                        (GBaseInitFunc) NULL,
+                        (GBaseFinalizeFunc) NULL,
+                        (GClassInitFunc) gdk_pixbuf_gif_collection_class_init,
+                        NULL,           /* class_finalize */
+                        NULL,           /* class_data */
+                        sizeof (GdkPixbufGifCollection),
+                        0,              /* n_preallocs */
+                        (GInstanceInitFunc) NULL,
+                };
+                
+                object_type = g_type_register_static (GDK_TYPE_PIXBUF_COLLECTION,
+                                                      "GdkPixbufGifCollection",
+                                                      &object_info, 0);
+        }
+        
+        return object_type;
+}
+
+static void
+gdk_pixbuf_gif_collection_class_init (GdkPixbufGifCollectionClass *klass)
+{
+        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+        GdkPixbufCollectionClass *collection_class =
+                GDK_PIXBUF_COLLECTION_CLASS (klass);
+        
+        collection_parent_class = g_type_class_peek_parent (klass);
+        
+        object_class->finalize = gdk_pixbuf_gif_collection_finalize;
+
+        collection_class->get_length = gdk_pixbuf_gif_collection_get_length;
+        collection_class->get_pixbuf = gdk_pixbuf_gif_collection_get_pixbuf;
+        collection_class->get_pixbuf_width = gdk_pixbuf_gif_collection_get_pixbuf_width;
+        collection_class->get_pixbuf_height = gdk_pixbuf_gif_collection_get_pixbuf_height;
+        collection_class->get_pixbuf_bpp = gdk_pixbuf_gif_collection_get_pixbuf_bpp;
+}
+
+static void
+gdk_pixbuf_gif_collection_finalize (GObject *object)
+{
+        GdkPixbufGifCollection *coll = GDK_PIXBUF_GIF_COLLECTION (object);
+
+        g_object_unref (coll->gif_anim);
+        
+        G_OBJECT_CLASS (collection_parent_class)->finalize (object);
+}
+
+static gint 
+gdk_pixbuf_gif_collection_get_length (GdkPixbufCollection *collection)
+{
+        GdkPixbufGifCollection *coll = GDK_PIXBUF_GIF_COLLECTION (collection);
+
+        return coll->gif_anim->n_frames;
+}
+
+static GdkPixbuf *
+gdk_pixbuf_gif_collection_get_pixbuf (GdkPixbufCollection *collection, int i)
+{
+        int k;
+        GdkPixbufGifCollection *coll = GDK_PIXBUF_GIF_COLLECTION (collection);
+        GList *l;
+        GdkPixbufFrame *frame;
+
+        l = coll->gif_anim->frames;
+        for (k = 0; k < i; k++) {
+                l = l->next;
+        }
+        frame = l->data;
+
+        gdk_pixbuf_gif_anim_frame_composite (coll->gif_anim, frame);
+
+        return frame->composited;
+}
+
+static gint gdk_pixbuf_gif_collection_get_pixbuf_width (GdkPixbufCollection *collection, int i) 
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_gif_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_width (pixbuf);
+}
+
+static gint gdk_pixbuf_gif_collection_get_pixbuf_height (GdkPixbufCollection *collection, int i)
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_gif_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_height (pixbuf);
+}
+
+static gint gdk_pixbuf_gif_collection_get_pixbuf_bpp (GdkPixbufCollection *collection, int i)
+{
+        GdkPixbuf *pixbuf;
+
+        pixbuf = gdk_pixbuf_gif_collection_get_pixbuf (collection, i);
+
+        return gdk_pixbuf_get_bits_per_sample (pixbuf) * gdk_pixbuf_get_n_channels (pixbuf);
+}
+
+
diff -uN gdk-pixbuf.orig/io-gif-animation.h gdk-pixbuf/io-gif-animation.h
--- gdk-pixbuf.orig/io-gif-animation.h	Mon May  7 17:58:41 2001
+++ gdk-pixbuf/io-gif-animation.h	Sun Sep  8 01:37:04 2002
@@ -89,7 +89,6 @@
 typedef struct _GdkPixbufGifAnimIter GdkPixbufGifAnimIter;
 typedef struct _GdkPixbufGifAnimIterClass GdkPixbufGifAnimIterClass;
 
-
 #define GDK_TYPE_PIXBUF_GIF_ANIM_ITER              (gdk_pixbuf_gif_anim_iter_get_type ())
 #define GDK_PIXBUF_GIF_ANIM_ITER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GIF_ANIM_ITER, GdkPixbufGifAnimIter))
 #define GDK_IS_PIXBUF_GIF_ANIM_ITER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GIF_ANIM_ITER))
@@ -120,6 +119,30 @@
 GType gdk_pixbuf_gif_anim_iter_get_type (void) G_GNUC_CONST;
 
 
+
+typedef struct _GdkPixbufGifCollection GdkPixbufGifCollection;
+typedef struct _GdkPixbufGifCollectionClass GdkPixbufGifCollectionClass;
+
+#define GDK_TYPE_PIXBUF_GIF_COLLECTION              (gdk_pixbuf_gif_collection_get_type ())
+#define GDK_PIXBUF_GIF_COLLECTION(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GIF_COLLECTION, GdkPixbufGifCollection))
+#define GDK_IS_PIXBUF_GIF_COLLECTION(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GIF_COLLECTION))
+
+#define GDK_PIXBUF_GIF_COLLECTION_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_GIF_COLLECTION, GdkPixbufGifCollectionClass))
+#define GDK_IS_PIXBUF_GIF_COLLECTION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_GIF_COLLECTION))
+#define GDK_PIXBUF_GIF_COLLECTION_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_GIF_COLLECTION, GdkPixbufGifCollectionClass))
+
+struct _GdkPixbufGifCollection {
+        GdkPixbufCollection parent_instance;
+        
+        GdkPixbufGifAnim   *gif_anim;
+};
+
+struct _GdkPixbufGifCollectionClass {
+        GdkPixbufCollectionClass parent_class;
+};
+
+GType gdk_pixbuf_gif_collection_get_type (void) G_GNUC_CONST;
+
 
 struct _GdkPixbufFrame {
 	/* The pixbuf with this frame's image data */
diff -uN gdk-pixbuf.orig/io-gif.c gdk-pixbuf/io-gif.c
--- gdk-pixbuf.orig/io-gif.c	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/io-gif.c	Sun Sep  8 02:42:16 2002
@@ -824,6 +824,7 @@
                         if (context->prepare_func)
                                 (* context->prepare_func) (context->frame->pixbuf,
                                                            GDK_PIXBUF_ANIMATION (context->animation),
+                                                           NULL,
                                                            context->user_data);
                 } else {
                         /* Otherwise init frame with last frame */
diff -uN gdk-pixbuf.orig/io-ico.c gdk-pixbuf/io-ico.c
--- gdk-pixbuf.orig/io-ico.c	Fri Sep  6 23:09:49 2002
+++ gdk-pixbuf/io-ico.c	Sun Sep  8 02:45:11 2002
@@ -429,6 +429,7 @@
 			/* Notify the client that we are ready to go */
 			(*State->prepared_func) (State->pixbuf,
                                                  NULL,
+						 NULL,
 						 State->user_data);
 
 	}
diff -uN gdk-pixbuf.orig/io-jpeg.c gdk-pixbuf/io-jpeg.c
--- gdk-pixbuf.orig/io-jpeg.c	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/io-jpeg.c	Sun Sep  8 02:41:44 2002
@@ -679,6 +679,7 @@
 			/* Notify the client that we are ready to go */
 			(* context->prepared_func) (context->pixbuf,
                                                     NULL,
+						    NULL,
 						    context->user_data);
 			
 		} else if (!context->did_prescan) {
diff -uN gdk-pixbuf.orig/io-png.c gdk-pixbuf/io-png.c
--- gdk-pixbuf.orig/io-png.c	Thu Aug 22 23:32:06 2002
+++ gdk-pixbuf/io-png.c	Sun Sep  8 02:41:21 2002
@@ -626,7 +626,7 @@
         /* Notify the client that we are ready to go */
 
         if (lc->prepare_func)
-                (* lc->prepare_func) (lc->pixbuf, NULL, lc->notify_user_data);
+                (* lc->prepare_func) (lc->pixbuf, NULL, NULL, lc->notify_user_data);
         
         return;
 }
diff -uN gdk-pixbuf.orig/io-pnm.c gdk-pixbuf/io-pnm.c
--- gdk-pixbuf.orig/io-pnm.c	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/io-pnm.c	Sun Sep  8 02:47:02 2002
@@ -998,6 +998,7 @@
 			/* Notify the client that we are ready to go */
 			(* context->prepared_func) (context->pixbuf,
 						    NULL,
+						    NULL,
 						    context->user_data);
 		}
 		
diff -uN gdk-pixbuf.orig/io-ras.c gdk-pixbuf/io-ras.c
--- gdk-pixbuf.orig/io-ras.c	Tue Jul 16 19:32:08 2002
+++ gdk-pixbuf/io-ras.c	Sun Sep  8 02:45:38 2002
@@ -194,6 +194,7 @@
 			/* Notify the client that we are ready to go */
 			(*State->prepared_func) (State->pixbuf,
                                                  NULL,
+						 NULL,
 						 State->user_data);
 
 	}
diff -uN gdk-pixbuf.orig/io-tga.c gdk-pixbuf/io-tga.c
--- gdk-pixbuf.orig/io-tga.c	Wed Sep  4 01:43:21 2002
+++ gdk-pixbuf/io-tga.c	Sun Sep  8 02:48:03 2002
@@ -795,7 +795,7 @@
 		}
 	}
 	if (!ctx->prepared) {
-		(*ctx->pfunc) (ctx->pbuf, NULL, ctx->udata);
+		(*ctx->pfunc) (ctx->pbuf, NULL, NULL, ctx->udata);
 		ctx->prepared = TRUE;
 	}
 	/* We shouldn't get here anyway. */
diff -uN gdk-pixbuf.orig/io-tiff.c gdk-pixbuf/io-tiff.c
--- gdk-pixbuf.orig/io-tiff.c	Sun Jul  7 01:10:45 2002
+++ gdk-pixbuf/io-tiff.c	Sun Sep  8 02:46:38 2002
@@ -249,7 +249,7 @@
 
         G_UNLOCK (tiff_loader);
 	if (context)
-		(* context->prepare_func) (pixbuf, NULL, context->user_data);
+		(* context->prepare_func) (pixbuf, NULL, NULL, context->user_data);
         G_LOCK (tiff_loader);
                 
         if (!TIFFRGBAImageBegin (&img, tiff, 1, emsg) || global_error) {
diff -uN gdk-pixbuf.orig/io-wbmp.c gdk-pixbuf/io-wbmp.c
--- gdk-pixbuf.orig/io-wbmp.c	Sun Jul  7 22:29:48 2002
+++ gdk-pixbuf/io-wbmp.c	Sun Sep  8 02:47:21 2002
@@ -277,7 +277,7 @@
 
 
 		    if(context->prepared_func)
-		      context->prepared_func(context->pixbuf, NULL, context->user_data);
+		      context->prepared_func(context->pixbuf, NULL, NULL, context->user_data);
 		  }
 	      }
 	    else if(context->needmore)
diff -uN gdk-pixbuf.orig/io-xbm.c gdk-pixbuf/io-xbm.c
--- gdk-pixbuf.orig/io-xbm.c	Fri Sep  6 23:09:49 2002
+++ gdk-pixbuf/io-xbm.c	Sun Sep  8 02:47:39 2002
@@ -307,7 +307,7 @@
 	row_stride = gdk_pixbuf_get_rowstride (pixbuf);
 
 	if (context)
-		(* context->prepare_func) (pixbuf, NULL, context->user_data);
+		(* context->prepare_func) (pixbuf, NULL, NULL, context->user_data);
 
 
 	/* Initialize PIXBUF */
diff -uN gdk-pixbuf.orig/io-xpm.c gdk-pixbuf/io-xpm.c
--- gdk-pixbuf.orig/io-xpm.c	Fri Sep  6 23:09:49 2002
+++ gdk-pixbuf/io-xpm.c	Sun Sep  8 02:46:17 2002
@@ -1474,6 +1474,7 @@
                if (pixbuf != NULL) {
                        (* context->prepare_func) (pixbuf,
                                                   NULL,
+						  NULL,
                                                   context->user_data);
                        (* context->update_func) (pixbuf, 0, 0, pixbuf->width, pixbuf->height, context->user_data);
                        g_object_unref (pixbuf);
