Struct repng::Options
[−]
[src]
pub struct Options { pub level: Compression, pub width: u32, pub height: u32, pub depth: u8, pub format: ColorFormat, pub buffer: usize, }
Image properties and compression options.
Fields
level: Compression
The compression level.
width: u32
The width of the image, in pixels.
height: u32
The height of the image, in pixels.
depth: u8
The number of bits in each channel.
format: ColorFormat
The format of the image.
buffer: usize
The size of the compressed data buffer.
This value determines the maximum size of an IDAT chunk.
Methods
impl Options
[src]
pub fn smallest(width: u32, height: u32) -> Self
[src]
Specifies an 8-bit RGBA image optimizing for image size.
pub fn fastest(width: u32, height: u32) -> Self
[src]
Specifies an 8-bit RGBA image optimizing for encoding speed.
pub fn build<W>(&self, sink: W) -> Result<Encoder<W, Standard>> where
W: Write,
[src]
W: Write,
Make a new encoder with these options and the default filter.
To customize the filter as well, see Encoder::new
.
pub fn stride(&self) -> usize
[src]
The number of bytes occupied by a single row of the uncompressed image.