diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-04-02 18:18:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-04-02 18:18:31 (GMT) |
commit | 6d61d799f483c98a1e0aeb624fa001a7fce24af0 (patch) | |
tree | a67b9ccfa323ad24c93a2fc2f7011cfa8ee0ba63 /generic/tkImgPhoto.c | |
parent | 8d2dbe96066152901e507e44cf7dec9b00f2bee3 (diff) | |
download | tk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.zip tk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.tar.gz tk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.tar.bz2 |
More use of Tcl_NewWideIntObj(), and more internal use of (size_t), for bigger ranges.
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index e1d54dd..c1055ac 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -849,10 +849,10 @@ ImgPhotoCmd( */ pixelPtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4; - channels[0] = Tcl_NewIntObj(pixelPtr[0]); - channels[1] = Tcl_NewIntObj(pixelPtr[1]); - channels[2] = Tcl_NewIntObj(pixelPtr[2]); - channels[3] = Tcl_NewIntObj(pixelPtr[3]); + channels[0] = Tcl_NewWideIntObj(pixelPtr[0]); + channels[1] = Tcl_NewWideIntObj(pixelPtr[1]); + channels[2] = Tcl_NewWideIntObj(pixelPtr[2]); + channels[3] = Tcl_NewWideIntObj(pixelPtr[3]); Tcl_SetObjResult(interp, Tcl_NewListObj(channelCount, channels)); return TCL_OK; } @@ -1141,7 +1141,7 @@ ImgPhotoCmd( if (boolMode) { Tcl_SetObjResult(interp, Tcl_NewBooleanObj( ! pixelPtr[3])); } else { - Tcl_SetObjResult(interp, Tcl_NewIntObj(pixelPtr[3])); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(pixelPtr[3])); } return TCL_OK; } |