Accusoft.ImagXpress13.Net
Palette Property
Example 




Gets or sets the color palette used for this ImageX object.
Syntax
'Declaration
 
Public Property Palette As ColorPalette
'Usage
 
Dim instance As ImageX
Dim value As ColorPalette
 
instance.Palette = value
 
value = instance.Palette
public ColorPalette Palette {get; set;}
public: __property ColorPalette* get_Palette();
public: __property void set_Palette( 
   ColorPalette* value
);
public:
property ColorPalette^ Palette {
   ColorPalette^ get();
   void set (    ColorPalette^ value);
}
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.
imageX.Palette.Entries[0] = System.Drawing.Color.Red;
The following code is the correct way to modify the first entry to Red.
System.Drawing.Imaging.ColorPalette palette;
palette = imageX.Palette;
if ( palette.Entries.Length > 0 )
{
	palette.Entries[0] = System.Drawing.Color.Red;
	imageX.Palette = palette;
}
Requirements

See Also

Reference

ImageX Class
ImageX Members

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback