diff options
author | Jonathan Blandford <jrb@redhat.com> | 2000-02-20 03:08:00 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2000-02-20 03:08:00 +0000 |
commit | 7ef740e03d628d46772f5ea7e05d4b7797a1986d (patch) | |
tree | ca11d9563bf1cd78cabb81150e49dac1cd91a43f /gdk-pixbuf | |
parent | 1dcb67c8f3b4f63b054c2b15de734d1c4cc0ab9c (diff) | |
download | gdk-pixbuf-7ef740e03d628d46772f5ea7e05d4b7797a1986d.tar.gz |
fix case where initial colormap entry is Transparent.
2000-02-19 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/io-gif.c (new_context): fix case where initial
colormap entry is Transparent.
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 5 | ||||
-rw-r--r-- | gdk-pixbuf/io-gif.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index d3b6f0805..a78beb6bb 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2000-02-19 Jonathan Blandford <jrb@redhat.com> + + * gdk-pixbuf/io-gif.c (new_context): fix case where initial + colormap entry is Transparent. + 2000-02-19 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf/pixops/pixops.c (scale_pixel): Fix error in diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index d566af1bb..1f1398316 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -354,7 +354,7 @@ gif_get_extension (GifContext *context) if ((context->block_buf[0] & 0x1) != 0) { context->gif89.transparent = context->block_buf[3]; } else { - context->gif89.transparent = FALSE; + context->gif89.transparent = -1; } } @@ -607,7 +607,7 @@ gif_fill_in_pixels (GifContext *context, guchar *dest, gint offset, guchar v) { guchar *pixel = NULL; - if (context->gif89.transparent) { + if (context->gif89.transparent != -1) { pixel = dest + (context->draw_ypos + offset) * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4; *pixel = context->color_map [0][(guchar) v]; *(pixel+1) = context->color_map [1][(guchar) v]; @@ -667,7 +667,7 @@ gif_get_lzw (GifContext *context) if (context->pixbuf == NULL) { context->pixbuf = gdk_pixbuf_new (ART_PIX_RGB, - context->gif89.transparent, + context->gif89.transparent != -1, 8, context->width, context->height); @@ -714,7 +714,7 @@ gif_get_lzw (GifContext *context) } bound_flag = TRUE; - if (context->gif89.transparent) { + if (context->gif89.transparent != -1) { temp = dest + context->draw_ypos * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4; *temp = context->color_map [0][(guchar) v]; *(temp+1) = context->color_map [1][(guchar) v]; |