Created
December 9, 2021 11:14
-
-
Save seki/40e83b4fc0bd17e44c5e8d0eeda4c2c9 to your computer and use it in GitHub Desktop.
create 16bit PGM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = ARGV.shift || 'p5.pgm' | |
buf = "P5 256 256 65535\n" + (0...(256 ** 2)).to_a.pack('n*') | |
File.write(name, buf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment