Skip to navigation
Create a simple png with rust
09.02.23
use image::{RgbImage, Rgb}; let mut img = RgbImage::new(32, 32); for x in 15..=17 { for y in 8..24 { img.put_pixel(x, y, Rgb([255, 0, 0])); img.put_pixel(y, x, Rgb([255, 0, 0])); } } img.save("output.png").unwrap();
https://docs.rs/image/0.24.5/image/struct.ImageBuffer.html
Reply
Anonymous
Information Epoch 1732451428
Live free or die.
Home
Notebook
Contact us