pub struct JxlEncoder { /* private fields */ }Expand description
Encodes a JPEG XL codestream.
Implementations§
Source§impl JxlEncoder
impl JxlEncoder
Sourcepub const fn new() -> JxlEncoder
pub const fn new() -> JxlEncoder
A lossy encoder at distance 1, visually lossless.
Sourcepub const fn lossless() -> JxlEncoder
pub const fn lossless() -> JxlEncoder
A lossless encoder.
Sourcepub const fn with_distance(distance: f32) -> JxlEncoder
pub const fn with_distance(distance: f32) -> JxlEncoder
A lossy encoder at distance: 1 is visually lossless, 0.5 finer,
up to 25 for the coarsest.
Sourcepub fn from_options(options: &EncodeOptions) -> JxlEncoder
pub fn from_options(options: &EncodeOptions) -> JxlEncoder
An encoder configured from generic encode options: lossless if
lossless, otherwise lossy at the distance libjxl’s cjxl gives
quality (90 is distance 1).
Trait Implementations§
Source§impl Debug for JxlEncoder
impl Debug for JxlEncoder
Source§impl Default for JxlEncoder
impl Default for JxlEncoder
Source§fn default() -> JxlEncoder
fn default() -> JxlEncoder
Returns the “default value” for a type. Read more
Source§impl Encoder for JxlEncoder
impl Encoder for JxlEncoder
Source§fn set_exif(&mut self, exif: Option<&[u8]>) -> Result<(), PixelsError>
fn set_exif(&mut self, exif: Option<&[u8]>) -> Result<(), PixelsError>
Written in an Exif box, which puts the file in the container.
Source§fn set_xmp(&mut self, xmp: Option<&[u8]>) -> Result<(), PixelsError>
fn set_xmp(&mut self, xmp: Option<&[u8]>) -> Result<(), PixelsError>
Written in an xml box, which puts the file in the container.
Source§fn write_header(
&mut self,
desc: &ImageDescriptor,
_sink: &mut dyn Sink,
) -> Result<(), PixelsError>
fn write_header( &mut self, desc: &ImageDescriptor, _sink: &mut dyn Sink, ) -> Result<(), PixelsError>
Begin an image, writing any container header. Read more
Source§fn write_row(
&mut self,
row: &[u8],
_sink: &mut dyn Sink,
) -> Result<(), PixelsError>
fn write_row( &mut self, row: &[u8], _sink: &mut dyn Sink, ) -> Result<(), PixelsError>
Write the next row, top to bottom. Read more
Source§fn finish(&mut self, sink: &mut dyn Sink) -> Result<(), PixelsError>
fn finish(&mut self, sink: &mut dyn Sink) -> Result<(), PixelsError>
Finish the image, writing any trailer and flushing the sink. Read more
Source§fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
Embed
profile as the image’s ICC colour profile, or write none. Read moreSource§fn set_density(&mut self, density: Option<Density>) -> Result<(), PixelsError>
fn set_density(&mut self, density: Option<Density>) -> Result<(), PixelsError>
Record
density as the image’s resolution, or write the format’s
default. Read moreAuto Trait Implementations§
impl Freeze for JxlEncoder
impl RefUnwindSafe for JxlEncoder
impl Send for JxlEncoder
impl Sync for JxlEncoder
impl Unpin for JxlEncoder
impl UnsafeUnpin for JxlEncoder
impl UnwindSafe for JxlEncoder
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