public interface IColorPalette
The color palette interface.
Modifier and Type | Method and Description |
---|---|
int |
getArgb32Color(int index)
Gets the 32-bit ARGB palette color by index.
|
int[] |
getArgb32Entries()
Gets an array of 32-bit ARGB structures.
|
Color |
getColor(int index)
Gets the palette color by index.
|
Color[] |
getEntries()
Gets an array of
com.aspose.imaging.Color structures. |
int |
getEntriesCount()
Gets the entries count.
|
int |
getNearestColorIndex(Color color)
Gets the index of the nearest color.
|
int |
getNearestColorIndex(int argb32Color)
Gets the index of the nearest 32-bit ARGB color.
|
boolean |
isCompactPalette()
Gets a value indicating whether compact palette is used.
|
int getEntriesCount()
Gets the entries count.
int[] getArgb32Entries()
Gets an array of 32-bit ARGB structures.
com.aspose.imaging.ColorPalette
.Color[] getEntries()
Gets an array of com.aspose.imaging.Color
structures.
com.aspose.imaging.Color
structure that make up this com.aspose.imaging.ColorPalette
.boolean isCompactPalette()
Gets a value indicating whether compact palette is used.
Compact palette means that image will contain only the specified palette entries if possible or in other words the image will be more compact and occupy less space; otherwise there will be 2^BitsPerPixel entries and image will reserve more space for all possible palette entries. Setting this value to true and changing palette entries may cause performance penalty since data movement may occur so use it carefully.
true
if compact palette is used; otherwise, false
.int getNearestColorIndex(int argb32Color)
Gets the index of the nearest 32-bit ARGB color.
argb32Color
- The 32-bit ARGB color.int getNearestColorIndex(Color color)
Gets the index of the nearest color.
color
- The color.int getArgb32Color(int index)
Gets the 32-bit ARGB palette color by index.
index
- The 32-bit ARGB palette color index.index
.RuntimeException
- if color palette index
specified is out of the palette entries range.Color getColor(int index)
Gets the palette color by index.
index
- The palette color index.index
.RuntimeException
- if color palette index
specified is out of the palette entries range.