summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 9fb74e6..ce49c94 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -15,7 +15,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.6 1999/04/16 01:51:15 stanton Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.7 1999/04/24 01:50:48 stanton Exp $
*/
#include "tkInt.h"
@@ -851,6 +851,11 @@ ImgPhotoCmd(clientData, interp, argc, argv)
!= TCL_OK) {
return TCL_ERROR;
}
+ if (Tcl_SetChannelOption(interp, chan, "-encoding", "binary")
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
if (MatchFileFormat(interp, chan, options.name, options.format,
&imageFormat, &imageWidth, &imageHeight) != TCL_OK) {
Tcl_Close(NULL, chan);
@@ -1364,6 +1369,10 @@ ImgPhotoConfigureMaster(interp, masterPtr, argc, argv, flags)
!= TCL_OK) {
return TCL_ERROR;
}
+ if (Tcl_SetChannelOption(interp, chan, "-encoding", "binary")
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
if (MatchFileFormat(interp, chan, masterPtr->fileString,
masterPtr->format, &imageFormat, &imageWidth,
&imageHeight) != TCL_OK) {