public final class ColorPaletteHelper extends Object
Helper class for color palettes manipulation.
Modifier and Type | Method and Description |
---|---|
static com.aspose.cad.IColorPalette |
create4Bit()
Creates the 4 bit color palette.
|
static com.aspose.cad.IColorPalette |
create4BitGrayscale(boolean minIsWhite)
Creates the 4 bit grayscale palette.
|
static com.aspose.cad.IColorPalette |
create8Bit()
Creates the 8 bit color palette.
|
static com.aspose.cad.IColorPalette |
create8BitGrayscale(boolean minIsWhite)
Creates the 8 bit grayscale palette.
|
static com.aspose.cad.IColorPalette |
createMonochrome()
Creates a monochrome color palette containing 2 colors only.
|
static com.aspose.cad.IColorPalette |
getCloseImagePalette(RasterImage image,
int entriesCount)
Gets color palette from raster image (palletizes image) in case the image does not have one.
|
static com.aspose.cad.ColorPalette |
getDownscalePalette(RasterImage image)
Get 256 color palette, composed from upper bits of initial image color values.
|
static com.aspose.cad.ColorPalette |
getUniformColorPalette(RasterImage image)
Get uniform 256 color palette.
|
public static com.aspose.cad.IColorPalette createMonochrome()
Creates a monochrome color palette containing 2 colors only.
public static com.aspose.cad.IColorPalette create4Bit()
Creates the 4 bit color palette.
public static com.aspose.cad.IColorPalette create4BitGrayscale(boolean minIsWhite)
Creates the 4 bit grayscale palette.
minIsWhite
- if set to true
the palette starts with white color, otherwise it starts with black color.public static com.aspose.cad.IColorPalette create8Bit()
Creates the 8 bit color palette.
public static com.aspose.cad.IColorPalette create8BitGrayscale(boolean minIsWhite)
Creates the 8 bit grayscale palette.
minIsWhite
- if set to true
the palette starts with white color, otherwise it starts with black color.public static com.aspose.cad.IColorPalette getCloseImagePalette(RasterImage image, int entriesCount)
Gets color palette from raster image (palletizes image) in case the image does not have one. In case palette exists_internalized it will be used instead performing calculations.
image
- The raster image.entriesCount
- The desired entries count.image
and contains entriesCount
entries.public static com.aspose.cad.ColorPalette getUniformColorPalette(RasterImage image)
Get uniform 256 color palette.
image
- The image.ColorPalette
.public static com.aspose.cad.ColorPalette getDownscalePalette(RasterImage image)
Get 256 color palette, composed from upper bits of initial image color values.
image
- The image.ColorPalette
.