Struct native_windows_gui::ImageSource
source · [−]pub struct ImageSource {
pub decoder: *mut IWICBitmapDecoder,
}
Expand description
Represents a image data source in read only mode.
Fields
decoder: *mut IWICBitmapDecoder
Implementations
sourceimpl 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 RefUnwindSafe for ImageSource
impl !Send for ImageSource
impl !Sync for ImageSource
impl Unpin for ImageSource
impl UnwindSafe for ImageSource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more