Struct libheif_rs::ImageHandle

source ·
pub struct ImageHandle { /* private fields */ }
Expand description

Encoded image.

Implementations§

source§

impl ImageHandle

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. This is the original image size without any transformations applied to it. Do not use this unless you know exactly what you are doing.

source

pub fn ispe_height(&self) -> i32

Get the image height from the ‘ispe’ box. This is the original image size without any transformations applied to it. Do not use this unless you know exactly what you are doing.

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) -> i32where T: Into<FourCC>,

source

pub fn metadata_block_ids<T>( &self, item_ids: &mut [ItemId], type_filter: T ) -> usizewhere 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(&self, metadata_id: ItemId) -> Result<Vec<u8>>

source

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

source

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

NOTE: This function does currently not return an NCLX profile if it is stored in the image bitstream. Only NCLX profiles stored as colr boxes are returned. This may change in the future.

Trait Implementations§

source§

impl Drop for ImageHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.