use std.process_bar; use std.os; use std.io; use std.math; var ppm = func(filename, width, height, RGB) { # P3 use ASCII number # P6 use binary character var fd = io.open(filename, "wb"); io.write(fd, "P6\n"~width~" "~height~"\n255\n"); for(var i = 0; i