RosettaCodeData/Task/Bitmap/Octave/bitmap-3.octave

9 lines
212 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
%example
im = create_rgb_image(200,200);
for x = 1:128
im = set_pixel(im, [x, x], [200, 50, 220]);
endfor
% it seems like saveimage wants double class on [0,1]
saveimage("image.ppm", double(im)./256, "ppm");