Bitmap/Write a PPM file: Difference between revisions
m
→{{header|BQN}}: Trivial simplifications: +¨ to +, and combine 256| of a list
mNo edit summary |
m (→{{header|BQN}}: Trivial simplifications: +¨ to +, and combine 256| of a list) |
||
Line 367:
all ← ∾red‿grn‿ble‿blk‿gry‿wht # join "colors" to 1D list
image_ppm ← 8‿4‿3 ⥊ all # reshape "all" to 8 rows by 4 cols by 3, "all" gets reused as needed to fill
image_ppm ↩ @ +
bytes_ppm ← header_ppm ∾ image_ppm
"small.ppm" •file.Bytes bytes_ppm</lang>
Line 375:
255
"
image_ppm ← @ +
"first_bqn.ppm" •file.Bytes header_ppm ∾ image_ppm</lang>
|