Reduces an image to a color palette according to PaletteOptions and returns the indices image along with its Palette.
ModuleJuicyPixels-3.3.8Haskell2010
Codec.Picture.ColorQuant
This module provide some color quantisation algorithm in order to help in the creation of paletted images. The most important function is palettize which will make everything to create a nice color indexed image with its palette.
- 2 types
- 3 values
- PackageJuicyPixels-3.3.8
- Exports5
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceColorQuant.hs
Converts RGBA image to the array of GifFame's to use in encodeComplexGifImage
Default palette option, which aim at the best quality and maximum possible colors (256)
Define which palette creation method is used.
Constructors
MedianMeanCutMedianMeanCut method, provide the best results (visualy) at the cost of increased calculations.
UniformVery fast algorithm (one pass), doesn't provide good looking results.
To specify how the palette will be created.
Constructors
PaletteOptionspaletteCreationMethod :: PaletteCreationMethodAlgorithm used to find the palette
enableImageDithering :: BoolDo we want to apply the dithering to the image. Enabling it often reduce compression ratio but enhance the perceived quality of the final image.
paletteColorCount :: IntMaximum number of color we want in the palette