Subject: | Images read as text files on Windows |
Downloaded OpenFrame and tried the Hangman examples on my w2k system.
The hangman images are garbled. It seems the files are opened and read as text instead of binary on Windows (as opposed to Unix where a file is a file).
I patched the Slot::Images file to include a binmode($fh); statement before the file is slurped. That seemed to fix my immediate problem, but after having spent all of five minutes in total with the code I'm sure you can see any other gotchas at other places in the code if they exist :)
"perldoc -f binmode" states that it:
"Arranges for FILEHANDLE to be read or written in "binary" or "text" mode on systems where the run-time libraries distinguish between binary and text files. If FILEHANDLE is an expression,"
so including it should work on any platform.
/J