summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPPM.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-24 01:50:46 (GMT)
committerstanton <stanton>1999-04-24 01:50:46 (GMT)
commit33b9462f0016ef41b6c303739ad7f53bc697430f (patch)
tree51fa2de010b339d9d837978fb86ce589f42a3d01 /generic/tkImgPPM.c
parent561def0a476b2905df665d317583408e48cb8ff2 (diff)
downloadtk-33b9462f0016ef41b6c303739ad7f53bc697430f.zip
tk-33b9462f0016ef41b6c303739ad7f53bc697430f.tar.gz
tk-33b9462f0016ef41b6c303739ad7f53bc697430f.tar.bz2
merged 8.1.0 changes into mainline
Diffstat (limited to 'generic/tkImgPPM.c')
-rw-r--r--generic/tkImgPPM.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkImgPPM.c b/generic/tkImgPPM.c
index 7482692..4342670 100644
--- a/generic/tkImgPPM.c
+++ b/generic/tkImgPPM.c
@@ -13,7 +13,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPPM.c,v 1.3 1999/04/16 01:51:15 stanton Exp $
+ * RCS: @(#) $Id: tkImgPPM.c,v 1.4 1999/04/24 01:50:47 stanton Exp $
*/
#include "tkInt.h"
@@ -269,6 +269,15 @@ FileWritePPM(interp, fileName, formatString, blockPtr)
return TCL_ERROR;
}
+ if (Tcl_SetChannelOption(interp, chan, "-translation", "binary")
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_SetChannelOption(interp, chan, "-encoding", "binary")
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
sprintf(header, "P6\n%d %d\n255\n", blockPtr->width, blockPtr->height);
Tcl_Write(chan, header, -1);