ImageMan.Net Version 3 Summer 2012 Release
GetClosestPaletteIndex Method
See Also  Send Feedback
DTI.ImageMan Namespace > ImPalette Class : GetClosestPaletteIndex Method





color

Glossary Item Box

Returns the closest palette index to the color passed in

Syntax

Visual Basic (Declaration) 
Public Function GetClosestPaletteIndex( _
   ByVal color As System.Drawing.Color _
) As System.Integer
Visual Basic (Usage)Copy Code
Dim instance As ImPalette
Dim color As System.Drawing.Color
Dim value As System.Integer
 
value = instance.GetClosestPaletteIndex(color)
C# 
public System.int GetClosestPaletteIndex( 
   System.Drawing.Color color
)
JScript 
public function GetClosestPaletteIndex( 
   color : System.Drawing.Color
) : System.int;
Managed Extensions for C++ 
public: System.int GetClosestPaletteIndex( 
   System.Drawing.Color color
) 
C++/CLI 
public:
System.int GetClosestPaletteIndex( 
   System.Drawing.Color color
) 

Parameters

color

Return Value

palette index

Remarks

Returns the closest palette index. Color matching algorithm also adjusts for chrominance. Will return -1 if there is not a palette loaded.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.