aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xfns.c31
2 files changed, 25 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4c9c5092bd5..af5025f7a82 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
11999-10-15 Gerd Moellmann <gerd@gnu.org>
2
3 * xfns.c (gif_load): Fix handling of interlaced GIFs.
4
11999-10-14 Dave Love <fx@gnu.org> 51999-10-14 Dave Love <fx@gnu.org>
2 6
3 * xdisp.c (handle_fontified_prop): GCPRO `pos'. 7 * xdisp.c (handle_fontified_prop): GCPRO `pos'.
diff --git a/src/xfns.c b/src/xfns.c
index 4afa9d2dee8..eee9b919eef 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -7966,7 +7966,7 @@ static struct image_keyword png_format[PNG_LAST] =
7966 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 7966 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}
7967}; 7967};
7968 7968
7969/* Structure describing the image type `gif'. */ 7969/* Structure describing the image type `png'. */
7970 7970
7971static struct image_type png_type = 7971static struct image_type png_type =
7972{ 7972{
@@ -8958,17 +8958,28 @@ gif_load (f, img)
8958 static int interlace_start[] = {0, 4, 2, 1}; 8958 static int interlace_start[] = {0, 4, 2, 1};
8959 static int interlace_increment[] = {8, 8, 4, 2}; 8959 static int interlace_increment[] = {8, 8, 4, 2};
8960 int pass, inc; 8960 int pass, inc;
8961 int row = interlace_start[0];
8962
8963 pass = 0;
8961 8964
8962 for (pass = 0; pass < 4; ++pass) 8965 for (y = 0; y < image_height; y++)
8963 { 8966 {
8964 inc = interlace_increment[pass]; 8967 if (row >= image_height)
8965 for (y = interlace_start[pass]; y < image_height; y += inc) 8968 {
8966 for (x = 0; x < image_width; ++x) 8969 row = interlace_start[++pass];
8967 { 8970 while (row >= image_height)
8968 unsigned i = gif->SavedImages[ino].RasterBits[y * image_width + x]; 8971 row = interlace_start[++pass];
8969 XPutPixel (ximg, x + image_left, y + image_top, 8972 }
8970 pixel_colors[i]); 8973
8971 } 8974 for (x = 0; x < image_width; x++)
8975 {
8976 unsigned int i
8977 = gif->SavedImages[ino].RasterBits[(y * image_width) + x];
8978 XPutPixel (ximg, x + image_left, row + image_top,
8979 pixel_colors[i]);
8980 }
8981
8982 row += interlace_increment[pass];
8972 } 8983 }
8973 } 8984 }
8974 else 8985 else