gdk-pixbuf animation loader: howto unload frames ?
- From: blah user <gpernot free fr>
- To: federico gimp org
- Cc: gtk-list gnome org
- Subject: gdk-pixbuf animation loader: howto unload frames ?
- Date: 04 Jul 2001 12:16:09 +0200
yep,
i'm working with gdk-pixbuf animation loader, but i can't see anyway in the
API to remove frames once played.
a way would be to add a gdk_pixbuf_animation_set_frames (patch follows).
thus, i can play 1,5 Mb gif animations within 16Mb :)
maybe, there is any other solution.
------> gdk-pixbuf-0.11.0-oc1.diff.gz <------
diff -ur /home/blah/tmp/gdk-pixbuf-0.11.0/gdk-pixbuf/gdk-pixbuf-animation.c ./gdk-pixbuf/gdk-pixbuf-animation.c
--- /home/blah/tmp/gdk-pixbuf-0.11.0/gdk-pixbuf/gdk-pixbuf-animation.c Thu Apr 13 00:39:29 2000
+++ ./gdk-pixbuf/gdk-pixbuf-animation.c Thu Jun 14 02:43:20 2001
@@ -229,6 +229,19 @@
return animation->frames;
}
+/**
+ * gdk_pixbuf_animation_set_frames:
+ * @animation: An animation.
+ *
+ * (XXX opencare patched gdk-pixbuf)) Set the list of frames of an animation.
+ *
+ **/
+void
+gdk_pixbuf_animation_set_frames (GdkPixbufAnimation *animation, GList *frames)
+{
+ g_return_if_fail (animation != NULL);
+ animation->frames = frames;
+}
^L
/**
diff -ur /home/blah/tmp/gdk-pixbuf-0.11.0/gdk-pixbuf/gdk-pixbuf.h ./gdk-pixbuf/gdk-pixbuf.h
--- /home/blah/tmp/gdk-pixbuf-0.11.0/gdk-pixbuf/gdk-pixbuf.h Thu Apr 13 00:31:02 2000
+++ ./gdk-pixbuf/gdk-pixbuf.h Wed Jun 13 16:40:35 2001
@@ -242,6 +242,7 @@
int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation);
int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation);
GList *gdk_pixbuf_animation_get_frames (GdkPixbufAnimation *animation);
+void gdk_pixbuf_animation_set_frames (GdkPixbufAnimation *animation, GList *frame);
int gdk_pixbuf_animation_get_num_frames (GdkPixbufAnimation *animation);
/* Frame accessors */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]