Struct imagequant::Attributes
[−]
[src]
pub struct Attributes { /* fields omitted */ }
Settings for the conversion proces. Start here.
Methods
impl Attributes
[src]
fn new() -> Self
[src]
fn set_max_colors(&mut self, value: i32) -> liq_error
[src]
It's better to use set_quality()
fn set_min_posterization(&mut self, value: i32) -> liq_error
[src]
Number of least significant bits to ignore.
Useful for generating palettes for VGA, 15-bit textures, or other retro platforms.
fn min_posterization(&mut self) -> i32
[src]
fn set_quality(&mut self, min: u32, max: u32) -> liq_error
[src]
Range 0-100, roughly like JPEG.
If minimum quality can't be met, quantization will fail.
Default is min 0, max 100.
fn quality(&mut self) -> (u32, u32)
[src]
Reads values set with set_quality
fn set_speed(&mut self, value: i32) -> liq_error
[src]
1-10.
Faster speeds generate images of lower quality, but may be useful for real-time generation of images.
fn set_last_index_transparent(&mut self, value: bool)
[src]
fn speed(&mut self) -> i32
[src]
fn max_colors(&mut self) -> i32
[src]
fn new_image<'a, RGBA: Copy>(
&self,
bitmap: &'a [RGBA],
width: usize,
height: usize,
gamma: f64
) -> Result<Image<'a>, liq_error>
[src]
&self,
bitmap: &'a [RGBA],
width: usize,
height: usize,
gamma: f64
) -> Result<Image<'a>, liq_error>
Describe dimensions of a slice of RGBA pixels
Use 0.0 for gamma if the image is sRGB (most images are).
fn new_histogram(&self) -> Histogram
[src]
fn quantize(&mut self, image: &Image) -> Result<QuantizationResult, liq_error>
[src]
Generate palette for the image
Trait Implementations
impl Drop for Attributes
[src]
impl Clone for Attributes
[src]
fn clone(&self) -> Attributes
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more