Struct imagequant::Histogram [] [src]

pub struct Histogram<'a> { /* fields omitted */ }

Generate one shared palette for multiple images.

Methods

impl<'a> Histogram<'a>
[src]

[src]

Creates histogram object that will be used to collect color statistics from multiple images.

All options should be set on attr before the histogram object is created. Options changed later may not have effect.

[src]

"Learns" colors from the image, which will be later used to generate the palette.

Fixed colors added to the image are also added to the histogram. If total number of fixed colors exceeds 256, this function will fail with LIQ_BUFFER_TOO_SMALL.

[src]

Alternative to add_image(). Intead of counting colors in an image, it directly takes an array of colors and their counts.

This function is only useful if you already have a histogram of the image from another source.

[src]

Generate palette for all images/colors added to the histogram.

Palette generated using this function won't be improved during remapping. If you're generating palette for only one image, it's better not to use the Histogram.

Trait Implementations

impl<'a> Drop for Histogram<'a>
[src]

[src]

Executes the destructor for this type. Read more

impl<'a> Send for Histogram<'a>
[src]