summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2024-06-08 20:45:23 (GMT)
committerfvogel <fvogelnew1@free.fr>2024-06-08 20:45:23 (GMT)
commitcba533255d5353b806f6c3369b3bd6dcb060269d (patch)
tree6a5df2adea44f31543d354d3593d23d6cbc946bd /generic
parent5f282fbabb61c71f5dcac0a3664bd3e6061585fe (diff)
downloadtk-cba533255d5353b806f6c3369b3bd6dcb060269d.zip
tk-cba533255d5353b806f6c3369b3bd6dcb060269d.tar.gz
tk-cba533255d5353b806f6c3369b3bd6dcb060269d.tar.bz2
Fix [1576528fff]: image read file with -from option - GIF case
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImgGIF.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 3467bd5..23a2953 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -710,11 +710,14 @@ FileReadGIF(
ckfree(block.pixelPtr);
goto error;
}
+ block.pixelPtr += srcX * block.pixelSize + srcY * block.pitch;
if (Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY,
width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) {
+ block.pixelPtr -= srcX * block.pixelSize + srcY * block.pitch;
ckfree(block.pixelPtr);
goto error;
}
+ block.pixelPtr -= srcX * block.pixelSize + srcY * block.pitch;
ckfree(block.pixelPtr);
}