From 159f654513f91b42512e97502bee98ca23472936 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 8 Aug 2002 09:35:08 +0000 Subject: * generic/tkImgGIF.c (FileReadGIF): fixed -from handling for gifs [Bug #467524] (obermeier) --- generic/tkImgGIF.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index cad9ea8..e952afb 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -29,7 +29,7 @@ * | provided "as is" without express or implied warranty. | * +-------------------------------------------------------------------+ * - * RCS: @(#) $Id: tkImgGIF.c,v 1.21 2002/06/14 13:35:48 dkf Exp $ + * RCS: @(#) $Id: tkImgGIF.c,v 1.22 2002/08/08 09:35:08 hobbs Exp $ */ /* @@ -469,12 +469,12 @@ FileReadGIF(interp, chan, fileName, format, imageHandle, destX, destY, block.height = height; block.pixelSize = (transparent>=0) ? 4 : 3; block.offset[3] = (transparent>=0) ? 3 : 0; - block.pitch = block.pixelSize * width; - nBytes = block.pitch * height; + block.pitch = block.pixelSize * fileWidth; + nBytes = block.pitch * fileHeight; block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes); - if (ReadImage(interp, (char *) block.pixelPtr, chan, width, - height, colorMap, fileWidth, fileHeight, srcX, srcY, + if (ReadImage(interp, (char *) block.pixelPtr, chan, fileWidth, + fileHeight, colorMap, fileWidth, fileHeight, srcX, srcY, BitSet(buf[8], INTERLACE), transparent) != TCL_OK) { goto error; } -- cgit v0.12