Bitmap/Write a PPM file: Difference between revisions
Content deleted Content added
m Added export marker to “writePPM”. |
m Changed "px" to "color" to match "bitmap.nim" interface. |
||
Line 1,336:
when isMainModule:
var image = initImage(100, 50)
image.fill(
for row in 10..20:
for col in 0..<image.w:
image[col, row] =
for row in 30..40:
for col in 0..<image.w:
image[col, row] =
image.writePPM("output.ppm")
</lang>
|