pub trait ConvertBuffer<T> {
// Required method
fn convert(&self) -> T;
}
Expand description
Provides color conversions for whole image buffers.
Required Methods§
Implementors§
impl<Container, FromType: Pixel, ToType> ConvertBuffer<ImageBuffer<ToType, Vec<<ToType as Pixel>::Subpixel>>> for ImageBuffer<FromType, Container>
This copies the color space information but is somewhat wrong, in numeric terms this conversion fails to actually convert rgb/luma with consistent treatment. But this trait impl is too generic to handle it correctly (missing any CICP related parameter for the coefficients) so the best effort here is to copy the metadata and have slighly incorrect color. May you’ve only been adding an alpha channel or converting sample types, which is fine.
It will very likely be deprecated in a future release.