pub trait PixelBufferConvertTypedExt: PixelBufferConvertExt {
// Required methods
fn to_rgb8(&self) -> PixelBuffer<Rgb<u8>>;
fn to_rgba8(&self) -> PixelBuffer<Rgba<u8>>;
fn to_gray8(&self) -> PixelBuffer<Gray<u8>>;
fn to_bgra8(&self) -> PixelBuffer<BGRA<u8>>;
}Expand description
Typed convenience conversions that return PixelBuffer<P>.
Requires the rgb feature for the concrete pixel types.
Required Methods§
Sourcefn to_rgb8(&self) -> PixelBuffer<Rgb<u8>>
fn to_rgb8(&self) -> PixelBuffer<Rgb<u8>>
Convert to RGB8, allocating a new buffer.
Sourcefn to_rgba8(&self) -> PixelBuffer<Rgba<u8>>
fn to_rgba8(&self) -> PixelBuffer<Rgba<u8>>
Convert to RGBA8, allocating a new buffer.
Sourcefn to_gray8(&self) -> PixelBuffer<Gray<u8>>
fn to_gray8(&self) -> PixelBuffer<Gray<u8>>
Convert to Gray8, allocating a new buffer.
Sourcefn to_bgra8(&self) -> PixelBuffer<BGRA<u8>>
fn to_bgra8(&self) -> PixelBuffer<BGRA<u8>>
Convert to BGRA8, allocating a new buffer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl PixelBufferConvertTypedExt for PixelBuffer
Available on crate feature
rgb only.