Hi!
I'm kind of new with Rust so bare with me :)
Im getting this error:
src/main.rs:70:22: 70:45 error: type annotations required: cannot resolve `<_ as image::buffer::Pixel>::Subpixel == _` [E0284]
src/main.rs:70 let mut imgbuf = image::ImageBuffer::new(width as u32, height as u32);
I tried specializing with the Rgba pixel type like this:
let mut imgbuf = image::ImageBuffer::new<image::Rgba>(width as u32, height as u32);
but it didnt work.
Any ideas?
Thanks a lot!
Fran
Try
let mut imgbuf: image::ImageBuffer<image::Rgba<u8>, _> = image::ImageBuffer::new(width as u32, height as u32);
instead.
let mut imgbuf: image::RgbaImage = image::ImageBuffer::new(width as u32, height as u32);
is an alias for that.
Thanks! It worked!
Here, Ill give you this present for your help (I've done it with this lib)

Most helpful comment
Here, Ill give you this present for your help (I've done it with this lib)
