summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkImgGIF.c10
1 files 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;
}