OtbEncoder

Struct OtbEncoder 

Source
pub struct OtbEncoder<W> { /* private fields */ }
Expand description

Encoder for Otb images.

Implementations§

Source§

impl<W: Write> OtbEncoder<W>

Source

pub fn new(writer: W) -> Self

Source

pub fn with_threshold(self, threshold: u8) -> Self

Trait Implementations§

Source§

impl<W: Write> ImageEncoder for OtbEncoder<W>

Source§

fn write_image( self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<(), ImageError>

Writes all the bytes in an image to the encoder. Read more
Source§

fn set_icc_profile( &mut self, icc_profile: Vec<u8>, ) -> Result<(), UnsupportedError>

Set the ICC profile to use for the image. Read more
Source§

fn set_exif_metadata(&mut self, exif: Vec<u8>) -> Result<(), UnsupportedError>

Set the EXIF metadata to use for the image. Read more

Auto Trait Implementations§

§

impl<W> Freeze for OtbEncoder<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for OtbEncoder<W>
where W: RefUnwindSafe,

§

impl<W> Send for OtbEncoder<W>
where W: Send,

§

impl<W> Sync for OtbEncoder<W>
where W: Sync,

§

impl<W> Unpin for OtbEncoder<W>
where W: Unpin,

§

impl<W> UnwindSafe for OtbEncoder<W>
where W: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.