[project @ 2005-02-02 02:05:58 by rjw]
Accomodate further GIF brokenness. svn path=/import/netsurf/; revision=1481
This commit is contained in:
parent
82e4286c5f
commit
42ab950b13
|
@ -169,7 +169,9 @@ int gif_initialise(struct gif_animation *gif) {
|
||||||
((gif->width == 800) && (gif->width == 600)) ||
|
((gif->width == 800) && (gif->width == 600)) ||
|
||||||
((gif->width == 1024) && (gif->width == 768)) ||
|
((gif->width == 1024) && (gif->width == 768)) ||
|
||||||
((gif->width == 1280) && (gif->width == 1024)) ||
|
((gif->width == 1280) && (gif->width == 1024)) ||
|
||||||
((gif->width == 1600) && (gif->width == 1200))) {
|
((gif->width == 1600) && (gif->width == 1200)) ||
|
||||||
|
((gif->width == 0) || (gif->height == 0)) ||
|
||||||
|
((gif->width > 2048) || (gif->height > 2048))) {
|
||||||
gif->width = 1;
|
gif->width = 1;
|
||||||
gif->height = 1;
|
gif->height = 1;
|
||||||
}
|
}
|
||||||
|
@ -278,11 +280,12 @@ static int gif_initialise_sprite(struct gif_animation *gif, unsigned int width,
|
||||||
|
|
||||||
/* Allocate some more memory
|
/* Allocate some more memory
|
||||||
*/
|
*/
|
||||||
if ((buffer = bitmap_create(max_width, max_height)) == NULL) {
|
if ((buffer = bitmap_create(max_width, max_height)) == NULL)
|
||||||
return GIF_INSUFFICIENT_MEMORY;
|
return GIF_INSUFFICIENT_MEMORY;
|
||||||
}
|
|
||||||
bitmap_destroy(gif->frame_image);
|
bitmap_destroy(gif->frame_image);
|
||||||
gif->frame_image = buffer;
|
gif->frame_image = buffer;
|
||||||
|
gif->width = max_width;
|
||||||
|
gif->height = max_height;
|
||||||
|
|
||||||
/* Invalidate our currently decoded image
|
/* Invalidate our currently decoded image
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue