From: glennrp Date: Mon, 31 Oct 2011 15:57:41 +0000 (+0000) Subject: Ensure the GIF encoder writes a large enough logical screen. X-Git-Tag: 7.0.1-0~6703 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff6c41f660a74b09d65fc3786ede2069dcbff018;p=imagemagick Ensure the GIF encoder writes a large enough logical screen. --- diff --git a/coders/gif.c b/coders/gif.c index a84bc13a8..7d87589de 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -1532,9 +1532,13 @@ static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, Determine image bounding box. */ page.width=image->columns; + if (image->page.width > page.width) + page.width=image->page.width; page.height=image->rows; - page.x=0; - page.y=0; + if (image->page.height > page.height) + page.height=image->page.height; + page.x=image->page.x; + page.y=image->page.y; if (write_info->adjoin != MagickFalse) for (next_image=image; next_image != (Image *) NULL; ) { @@ -1546,12 +1550,9 @@ static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, page.height=next_image->page.height+page.y; next_image=GetNextImageInList(next_image); } - page.x=image->page.x; - page.y=image->page.y; - if ((image->page.width != 0) && (image->page.height != 0)) - page=image->page; (void) WriteBlobLSBShort(image,(unsigned short) page.width); (void) WriteBlobLSBShort(image,(unsigned short) page.height); + /* Write images to file. */