diff options
author | Radek Doulik <rodo@helixcode.com> | 2000-04-03 08:59:43 +0000 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2000-04-03 08:59:43 +0000 |
commit | 133ab96180c20e1d5c1556ccd4418e1cbb41dd95 (patch) | |
tree | e77203059539699ca13a3a5b77eb9161f46becb0 /gdk-pixbuf/gdk-pixbuf-loader.c | |
parent | 8a680eb75ce7199a78397734f53f1ffc8fe8a7bb (diff) | |
download | gtk+-133ab96180c20e1d5c1556ccd4418e1cbb41dd95.tar.gz |
same as below
2000-03-29 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/gdk-pixbuf-animation.c
(gdk_pixbuf_animation_new_from_file): same as below
* gdk-pixbuf/io-gif.c (gif_get_lzw): added update of width and
height in GdkPixbufAnimation
2000-03-28 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/io-gif.c (gif_get_lzw): test also for
context->frame_done_func and context->anim_done_func to make
progressive animation loading work
* gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
added priv->pixbuf = NULL as pixbuf is now in frame (and to make
gdk_pixbuf_loader_prepare happy)
(gdk_pixbuf_loader_frame_done): update animation bbox
* gdk-pixbuf/gdk-pixbuf.h: added bbox size (width, height) to
_GdkPixbufAnimation
2000-03-27 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/io-gif.c (gif_get_lzw): use frame_len and frame_width
instead of width and height
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-loader.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 56637df75d..777b767d14 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -263,10 +263,27 @@ gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader) priv = GDK_PIXBUF_LOADER (loader)->private; + priv->pixbuf = NULL; + if (priv->animation == NULL) { priv->animation = g_new0 (GdkPixbufAnimation, 1); priv->animation->n_frames = 0; priv->animation->ref_count = 1; + priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf); + priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf); + } else { + int w, h; + + /* update bbox size */ + w = gdk_pixbuf_get_width (frame->pixbuf); + h = gdk_pixbuf_get_height (frame->pixbuf); + + if (w > priv->animation->width) { + priv->animation->width = h; + } + if (h > priv->animation->height) { + priv->animation->height = h; + } } priv->animation->frames = g_list_append (priv->animation->frames, frame); |