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