1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Check for 256, not 255, colors in a GIF image.
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2019-02-12
--- a/map/map.c
+++ b/map/map.c
@@ -244,7 +244,7 @@
pal = file->SavedImages[0].ImageDesc.ColorMap ;
if (!pal)
fatal_error (_("GIF file does not contain a colour palette")) ;
- if (pal->ColorCount > 255)
+ if (pal->ColorCount > 256)
fatal_error (_("GIF file has more than 256 colours")) ;
memset (map->palette, 0, PALETTE_SIZE) ;
@@ -588,7 +588,8 @@
png_init_io (png_ptr, png) ;
png_read_info (png_ptr, info_ptr) ;
- png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, 0, 0 , 0) ;
+ int32_t interl, compr, filter;
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, &interl, &compr, &filter);
row = malloc( sizeof(Uint32) * width );
if ( !row ) {
|