summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-08-08 09:35:08 (GMT)
committerhobbs <hobbs>2002-08-08 09:35:08 (GMT)
commit159f654513f91b42512e97502bee98ca23472936 (patch)
tree60bc7100941516ee7afc7f474f2eacbed2a35186 /generic/tkImgGIF.c
parent888f23262ad861e7d1698fe726c3623dc69d23eb (diff)
downloadtk-159f654513f91b42512e97502bee98ca23472936.zip
tk-159f654513f91b42512e97502bee98ca23472936.tar.gz
tk-159f654513f91b42512e97502bee98ca23472936.tar.bz2
* generic/tkImgGIF.c (FileReadGIF): fixed -from handling for gifs
[Bug #467524] (obermeier)
Diffstat (limited to 'generic/tkImgGIF.c')
-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;
}