public final class ColorPalette extends Object
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors. Not inheritable.
| Constructor and Description |
|---|
ColorPalette(int count)
Initializes a new instance of the
ColorPalette class and IsCompactPalette is false. |
| Modifier and Type | Method and Description |
|---|---|
Color[] |
getEntries()
Gets an array of
com.aspose.drawing.Color structures. |
int |
getFlags() |
boolean |
isCompactPalette()
Gets or sets a value indicating whether compact palette is used.
|
void |
setEntries(int i,
Color color) |
void |
setFlags(int flags) |
public ColorPalette(int count)
Initializes a new instance of the ColorPalette class and IsCompactPalette is false.
count - The color palette entries.public Color[] getEntries()
Gets an array of com.aspose.drawing.Color structures.
com.aspose.drawing.Color structure that make up this Aspose.Imaging.ColorPalette.public boolean isCompactPalette()
Gets or sets a value indicating whether compact palette is used.
true if compact palette is used; otherwise, false.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.
public int getFlags()
public void setFlags(int flags)
public void setEntries(int i,
Color color)
Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.