pub struct IcoFrame<'a> { /* private fields */ }
Expand description
An ICO image entry
Implementations§
Source§impl<'a> IcoFrame<'a>
impl<'a> IcoFrame<'a>
Sourcepub fn with_encoded(
encoded_image: impl Into<Cow<'a, [u8]>>,
width: u32,
height: u32,
color_type: ExtendedColorType,
) -> Result<IcoFrame<'a>, ImageError>
pub fn with_encoded( encoded_image: impl Into<Cow<'a, [u8]>>, width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<IcoFrame<'a>, ImageError>
Construct a new IcoFrame
using a pre-encoded PNG or BMP
The width
and height
must be between 1 and 256 (inclusive).
Sourcepub fn as_png(
buf: &[u8],
width: u32,
height: u32,
color_type: ExtendedColorType,
) -> Result<IcoFrame<'a>, ImageError>
pub fn as_png( buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<IcoFrame<'a>, ImageError>
Construct a new IcoFrame
by encoding buf
as a PNG
The width
and height
must be between 1 and 256 (inclusive)
Auto Trait Implementations§
impl<'a> Freeze for IcoFrame<'a>
impl<'a> RefUnwindSafe for IcoFrame<'a>
impl<'a> Send for IcoFrame<'a>
impl<'a> Sync for IcoFrame<'a>
impl<'a> Unpin for IcoFrame<'a>
impl<'a> UnwindSafe for IcoFrame<'a>
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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.