pub struct ImageSource {
pub decoder: *mut IWICBitmapDecoder,
}
Expand description
Represents a image data source in read only mode.
Fields§
§decoder: *mut IWICBitmapDecoder
Implementations§
Source§impl ImageSource
impl ImageSource
Sourcepub fn frame_count(&self) -> u32
pub fn frame_count(&self) -> u32
Return the number of frame in the image. For most format (ex: PNG), this will be 1. It might be more than 1 in animated image formats (such as GIFs).
Sourcepub fn frame(&self, index: u32) -> Result<ImageData, NwgError>
pub fn frame(&self, index: u32) -> Result<ImageData, NwgError>
Return the image data of the requested frame in a ImageData object.
pub fn container_format(&self) -> ContainerFormat
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageSource
impl RefUnwindSafe for ImageSource
impl !Send for ImageSource
impl !Sync for ImageSource
impl Unpin for ImageSource
impl UnwindSafe for ImageSource
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