Skip to main content

PixelBufferConvertTypedExt

Trait PixelBufferConvertTypedExt 

Source
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§

Source

fn to_rgb8(&self) -> PixelBuffer<Rgb<u8>>

Convert to RGB8, allocating a new buffer.

Source

fn to_rgba8(&self) -> PixelBuffer<Rgba<u8>>

Convert to RGBA8, allocating a new buffer.

Source

fn to_gray8(&self) -> PixelBuffer<Gray<u8>>

Convert to Gray8, allocating a new buffer.

Source

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§

Source§

impl PixelBufferConvertTypedExt for PixelBuffer

Available on crate feature rgb only.