Skip to content

Mutable methods #23

@owenthewizard

Description

@owenthewizard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions