image icon indicating copy to clipboard operation
image copied to clipboard

Add utility from_raw_bgr{,a} for ImageBuffer

Open 197g opened this issue 3 months ago • 0 comments

It is one of the most common channel orders other than Rgb and the construction involves nothing complicated, just swapping the channels around. We don't support that layout during computation, where it would complicate significant parts of Pixel, but as a helper for transferring a buffer we can easily have both on the Rgb{,A} typed containers.

See: https://github.com/image-rs/image/discussions/2595 which seems like a paper cut that can be easily and confidently solved.

197g avatar Sep 04 '25 15:09 197g