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
) -> ImageResult<Self>
pub fn with_encoded( encoded_image: impl Into<Cow<'a, [u8]>>, width: u32, height: u32, color_type: ExtendedColorType ) -> ImageResult<Self>
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
) -> ImageResult<Self>
pub fn as_png( buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType ) -> ImageResult<Self>
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