Struct lodepng::Encoder [−][src]
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]
&mut self,
mode: FilterStrategy,
palette_filter_zero: bool
)
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]
&mut self,
callback: custom_compress_callback,
context: *const c_void
)
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]
&mut self,
callback: custom_compress_callback,
context: *const c_void
)
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]
&mut self,
image: &[PixelType],
w: usize,
h: usize
) -> Result<Vec<u8>, Error>
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]
&mut self,
filepath: P,
image: &[PixelType],
w: usize,
h: usize
) -> Result<(), Error>
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
Auto Trait Implementations
impl RefUnwindSafe for Encoder
[src]
impl !Send for Encoder
[src]
impl !Sync for Encoder
[src]
impl Unpin for Encoder
[src]
impl UnwindSafe for Encoder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,