[][src]Struct lodepng::Encoder

pub struct Encoder { /* fields omitted */ }

Make an image with custom settings

Implementations

impl Encoder[src]

pub fn new() -> Self[src]

pub fn set_auto_convert(&mut self, mode: bool)[src]

If true, convert to output format

pub fn set_filter_strategy(
    &mut self,
    mode: FilterStrategy,
    palette_filter_zero: bool
)
[src]

palette_filter_zero controls filtering for low-bitdepth images

pub fn set_text_compression(&mut self, compr: bool)[src]

gzip text metadata

pub fn set_custom_zlib(
    &mut self,
    callback: custom_compress_callback,
    context: *const c_void
)
[src]

Compress using another zlib implementation. It's gzip header + deflate + adler32 checksum.

pub fn set_custom_deflate(
    &mut self,
    callback: custom_compress_callback,
    context: *const c_void
)
[src]

Compress using another deflate implementation. It's just deflate, without headers or checksum.

pub fn info_raw(&self) -> &ColorMode[src]

pub fn info_raw_mut(&mut self) -> &mut ColorMode[src]

Color mode of the source bytes to be encoded

pub fn info_png(&self) -> &Info[src]

pub fn info_png_mut(&mut self) -> &mut Info[src]

Color mode of the file to be created

pub fn encode<PixelType: Pod>(
    &mut self,
    image: &[PixelType],
    w: usize,
    h: usize
) -> Result<Vec<u8>, Error>
[src]

Takes any pixel type, but for safety the type has to be marked as "plain old data"

pub fn encode_file<PixelType: Pod, P: AsRef<Path>>(
    &mut self,
    filepath: P,
    image: &[PixelType],
    w: usize,
    h: usize
) -> Result<(), Error>
[src]

Takes any pixel type, but for safety the type has to be marked as "plain old data"

pub fn settings_mut(&mut self) -> &mut EncoderSettings[src]

Trait Implementations

impl Clone for Encoder[src]

impl Debug for Encoder[src]

impl Default for Encoder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.