pub struct PngEncoderExtended { /* private fields */ }Expand description
PNG encoder with metadata support.
Implementations§
Source§impl PngEncoderExtended
impl PngEncoderExtended
Sourcepub fn new(config: EncoderConfig) -> Self
pub fn new(config: EncoderConfig) -> Self
Create a new extended PNG encoder.
Sourcepub fn with_chromaticity(self, chroma: Chromaticity) -> Self
pub fn with_chromaticity(self, chroma: Chromaticity) -> Self
Set chromaticity coordinates.
Sourcepub fn with_physical_dimensions(self, dims: PhysicalDimensions) -> Self
pub fn with_physical_dimensions(self, dims: PhysicalDimensions) -> Self
Set physical dimensions.
Sourcepub fn with_dpi(self, dpi_x: f64, dpi_y: f64) -> Self
pub fn with_dpi(self, dpi_x: f64, dpi_y: f64) -> Self
Set DPI (converts to physical dimensions in meters).
Sourcepub const fn with_background_color(self, r: u16, g: u16, b: u16) -> Self
pub const fn with_background_color(self, r: u16, g: u16, b: u16) -> Self
Set background color.
Sourcepub fn encode_rgba(
&self,
width: u32,
height: u32,
data: &[u8],
) -> CodecResult<Vec<u8>>
pub fn encode_rgba( &self, width: u32, height: u32, data: &[u8], ) -> CodecResult<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PngEncoderExtended
impl RefUnwindSafe for PngEncoderExtended
impl Send for PngEncoderExtended
impl Sync for PngEncoderExtended
impl Unpin for PngEncoderExtended
impl UnsafeUnpin for PngEncoderExtended
impl UnwindSafe for PngEncoderExtended
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more