May 2018
Beginner
252 pages
6h 19m
English
If the file you work with contains only bytes (not readable text), as with multimedia files (pictures, audio, movies), add the /binary refinement, as shown in this example where a png image is loaded in a temporary variable tmp :
tmp: read/binary %red.png;== #{89504E470D0A1A0A0000000D49484452000002EE000002ED08060000007789E164000078C34944415478DAECDD079C645599F7F1E739F75655E7389DD30406860C8A202220028AB8200883AEBB20418220023A8489...}Now we write tmp out to another file red-copy.png:
write/binary %red-copy.png tmp
To follow better Red's idiomatic way of writing, eliminate tmp and just write—write/binary %red-copy2.png read/binary %red.png.