Accusoft.ImagXpress12.Net
Palette Property
See Also  Example Send Feedback
Accusoft.ImagXpressSdk Namespace > ImageX Class : Palette Property




Glossary Item Box

Gets or sets the color palette used for this ImageX object.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Remarks

If the ImageX does not have a palette then an empty palette is returned.

The Palette property returns and sets a palette in one operation. Like the System.Drawing.Bitmap class, the Palette can not be modified on the fly.

Example

For instance, the following code does not change the first entry in ImageX's palette to Red.

The following code is the correct way to modify the first entry to Red.

C#Copy Code
imageX.Palette.Entries[0] = System.Drawing.Color.Red;
C#Copy Code
System.Drawing.Imaging.ColorPalette palette;
palette = imageX.Palette;
if ( palette.Entries.Length > 0 )
{
	palette.Entries[0] = System.Drawing.Color.Red;
	imageX.Palette = palette;
}

See Also

©2013. Accusoft Corporation. All Rights Reserved.