Would it be possible to write mutable versions of functions to allow for in-place image editing? For example, the BGRA --> RGBA in examples/screenshot.rs could be rewritten as:
for pixel in buffer.chunks_exact_mut(4) {
unsafe { pixel.get_unchecked_mut(0..3).reverse() }
}
Not sure if that's actually better but I'm working on a project that could use scrap if it allowed in-place editing of the screenshot.
Would it be possible to write mutable versions of functions to allow for in-place image editing? For example, the
BGRA --> RGBA
inexamples/screenshot.rs
could be rewritten as:Not sure if that's actually better but I'm working on a project that could use scrap if it allowed in-place editing of the screenshot.