pub struct ImageCodec { /* private fields */ }
Expand description
Provides a unified interface for inspecting image data and creating image decoders & encoders.
Implementations§
Source§impl ImageCodec
impl ImageCodec
Sourcepub fn create_decoder(&self) -> Option<ImageDecoder>
pub fn create_decoder(&self) -> Option<ImageDecoder>
Creates an ImageDecoder
for this codec.
Sourcepub fn create_encoder(&self) -> Option<ImageEncoder>
pub fn create_encoder(&self) -> Option<ImageEncoder>
Creates an ImageEncoder
for this codec.
Sourcepub fn inspect_data<R: AsRef<[u8]>>(&self, data: R) -> u32
pub fn inspect_data<R: AsRef<[u8]>>(&self, data: R) -> u32
Inspects the given data blob and determines how likely it is that the file belongs to this codec.
Sourcepub fn built_in_codecs() -> Array<ImageCodec>
pub fn built_in_codecs() -> Array<ImageCodec>
Returns the blend2d builtin codecs.
Sourcepub fn add_to_built_in(codec: &ImageCodec)
pub fn add_to_built_in(codec: &ImageCodec)
Adds a codec to the built in codecs list.
Sourcepub fn remove_from_built_in(codec: &ImageCodec)
pub fn remove_from_built_in(codec: &ImageCodec)
Removes the codec from the built in codecs list.
Sourcepub fn extensions(&self) -> impl Iterator<Item = &str>
pub fn extensions(&self) -> impl Iterator<Item = &str>
The codec’s file extensions.
Sourcepub fn features(&self) -> ImageCodecFeatures
pub fn features(&self) -> ImageCodecFeatures
The codec’s features.
Trait Implementations§
Source§impl Clone for ImageCodec
impl Clone for ImageCodec
Source§impl Debug for ImageCodec
impl Debug for ImageCodec
Source§impl Drop for ImageCodec
impl Drop for ImageCodec
Source§impl PartialEq for ImageCodec
impl PartialEq for ImageCodec
Auto Trait Implementations§
impl Freeze for ImageCodec
impl RefUnwindSafe for ImageCodec
impl !Send for ImageCodec
impl !Sync for ImageCodec
impl Unpin for ImageCodec
impl UnwindSafe for ImageCodec
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