From 08af2b82f989e55f95085dd34ea582ccd61f9144 Mon Sep 17 00:00:00 2001 From: pnunn Date: Fri, 19 Jun 1998 00:05:19 +0000 Subject: [PATCH] SF1in #142422. git-svn-id: svn://10.0.0.236/trunk@4104 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libimg/src/gif.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/modules/libimg/src/gif.c b/mozilla/modules/libimg/src/gif.c index 22c6ca4749d..80d030e1320 100644 --- a/mozilla/modules/libimg/src/gif.c +++ b/mozilla/modules/libimg/src/gif.c @@ -706,7 +706,7 @@ gif_clear_screen(gif_struct *gs) int src_trans_pixel_index; uint8 *rowbuf = gs->rowbuf; NI_PixmapHeader *src_header = ic->src_header; - IL_IRGB *saved_src_trans_pixel; + IL_IRGB *saved_src_trans_pixel, *saved_img_trans_pixel; /* Catch images that fall outside the logical screen. */ if ((erase_x_offset + erase_width) > gs->screen_width) @@ -714,12 +714,15 @@ gif_clear_screen(gif_struct *gs) /* We have to temporarily pretend the image is transparent so we can clear using the context's background color. */ + saved_img_trans_pixel = ic->image->header.transparent_pixel; saved_src_trans_pixel = src_header->transparent_pixel; src_header->transparent_pixel = NULL; + ic->image->header.transparent_pixel = NULL; /* Pick an index for the source image's temporary transparent pixel. The actual choice is immaterial since it will only be used for the clear screen operation. */ + src_trans_pixel_index = 0; if (!il_gif_init_transparency(ic, src_trans_pixel_index)) return MK_OUT_OF_MEMORY; @@ -739,6 +742,7 @@ gif_clear_screen(gif_struct *gs) /* Reset the source image's transparent pixel to its former state. */ il_gif_destroy_transparency(ic); src_header->transparent_pixel = saved_src_trans_pixel; + ic->image->header.transparent_pixel = saved_img_trans_pixel; } return 0; }