ColorPaletteHelper.GetCloseImagePalette

GetCloseImagePalette(RasterImage, int)

Gets color palette from raster image (palletizes image) in case the image does not have one. In case palette exists it will be used instead performing calculations.

public static IColorPalette GetCloseImagePalette(RasterImage image, int entriesCount)
ParameterTypeDescription
imageRasterImageThe raster image.
entriesCountInt32The desired entries count.

Return Value

The color palette which starts with the most frequent colors from the image and contains entriesCount entries.

See Also


GetCloseImagePalette(RasterImage, Rectangle, int)

Gets color palette from raster image (palletizes image) in case the image does not have one. In case palette exists it will be used instead performing calculations.

public static IColorPalette GetCloseImagePalette(RasterImage image, Rectangle destBounds, 
    int entriesCount)
ParameterTypeDescription
imageRasterImageThe raster image.
destBoundsRectangleThe destination image bounds.
entriesCountInt32The desired entries count.

Return Value

The color palette which starts with the most frequent colors from the image and contains entriesCount entries.

See Also


GetCloseImagePalette(RasterImage, Rectangle, int, bool)

Gets color palette from raster image (palletizes image) in case the image does not have one. In case palette exists it will be used instead performing calculations.

public static IColorPalette GetCloseImagePalette(RasterImage image, Rectangle destBounds, 
    int entriesCount, bool useImagePalette)
ParameterTypeDescription
imageRasterImageThe raster image.
destBoundsRectangleThe destination image bounds.
entriesCountInt32The desired entries count.
useImagePaletteBooleanIf set, it will use its own image palette if available

Return Value

The color palette which starts with the most frequent colors from the image and contains entriesCount entries.

See Also