Skip to main content

ImageHandle

Struct ImageHandle 

Source
pub struct ImageHandle { /* private fields */ }
Expand description

Encoded image.

Implementations§

Source§

impl ImageHandle

Source

pub fn item_id(&self) -> ItemId

Source

pub fn width(&self) -> u32

Source

pub fn height(&self) -> u32

Source

pub fn has_alpha_channel(&self) -> bool

Source

pub fn is_premultiplied_alpha(&self) -> bool

Source

pub fn is_primary(&self) -> bool

Source

pub fn luma_bits_per_pixel(&self) -> u8

Source

pub fn chroma_bits_per_pixel(&self) -> u8

Source

pub fn ispe_width(&self) -> i32

Get the image width from the ‘ispe’ box.

Source

pub fn ispe_height(&self) -> i32

Get the image height from the ‘ispe’ box.

Source

pub fn has_depth_image(&self) -> bool

Source

pub fn number_of_depth_images(&self) -> i32

Source

pub fn depth_image_ids(&self, item_ids: &mut [ItemId]) -> usize

Source

pub fn depth_image_handle(&self, depth_image_id: ItemId) -> Result<Self>

Source

pub fn number_of_thumbnails(&self) -> usize

Source

pub fn thumbnail_ids(&self, item_ids: &mut [ItemId]) -> usize

Source

pub fn thumbnail(&self, thumbnail_id: ItemId) -> Result<Self>

Source

pub fn number_of_metadata_blocks<T>(&self, type_filter: T) -> i32
where T: Into<FourCC>,

Source

pub fn metadata_block_ids<T>( &self, item_ids: &mut [ItemId], type_filter: T, ) -> usize
where T: Into<FourCC>,

Source

pub fn metadata_type(&self, metadata_id: ItemId) -> Option<&str>

Source

pub fn metadata_content_type(&self, metadata_id: ItemId) -> Option<&str>

Source

pub fn metadata_size(&self, metadata_id: ItemId) -> usize

Source

pub fn metadata_item_uri_type(&self, metadata_id: ItemId) -> Option<&str>

Source

pub fn metadata(&self, metadata_id: ItemId) -> Result<Vec<u8>>

Source

pub fn all_metadata(&self) -> Vec<ImageMetadata>

Source

pub fn preferred_decoding_colorspace(&self) -> Result<ColorSpace>

Source

pub fn color_profile_raw(&self) -> Option<ColorProfileRaw>

Source

pub fn color_profile_nclx(&self) -> Option<ColorProfileNCLX>

Source

pub fn add_region_item( &mut self, reference_width: u32, reference_height: u32, ) -> Result<RegionItem>

Available on crate feature v1_18 only.
Source

pub fn region_items(&self) -> Vec<RegionItem>

Available on crate feature v1_18 only.
Source

pub fn auxiliary_images<T: Into<Option<AuxiliaryImagesFilter>>>( &self, filter: T, ) -> Vec<ImageHandle>

Source

pub fn auxiliary_type(&self) -> Result<String>

Trait Implementations§

Source§

impl Drop for ImageHandle

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.