LEADTOOLS (Leadtools assembly)
LEAD Technologies, Inc

TranslateColor(RasterImage,RasterColor) Method






Destination RasterImage object.
Value that specifies the color in the image to be translated.
Translates the specified color in the image, and returns the nearest matching color in the destination image. .NET support Silverlight support WinRT support
Syntax
public RasterColor TranslateColor( 
   RasterImage destImage,
   RasterColor color
)
'Declaration
 
Public Overloads Function TranslateColor( _
   ByVal destImage As RasterImage, _
   ByVal color As RasterColor _
) As RasterColor
'Usage
 
Dim instance As RasterImage
Dim destImage As RasterImage
Dim color As RasterColor
Dim value As RasterColor
 
value = instance.TranslateColor(destImage, color)
public RasterColor TranslateColor( 
   RasterImage destImage,
   RasterColor color
)
 function Leadtools.RasterImage.TranslateColor(RasterImage,RasterColor)( 
   destImage ,
   color 
)
public:
RasterColor TranslateColor( 
   RasterImage^ destImage,
   RasterColor color
) 

Parameters

destImage
Destination RasterImage object.
color
Value that specifies the color in the image to be translated.

Return Value

The color value or the palette index of the nearest matching color in the destination image. If the destination image is 8 bits per pixel or less, this is always the palette index (The value of the RasterColor.IsPaletteIndex is true). Otherwise, it is the color value.
Remarks

When creating a target image for animation, you can use this method to ensure that the correct color is specified as the background color.

The reverse of this method (to get a true RGB color value from a palette index color), use GetTrueColorValue.

Example
For an example, refer to TransparentColor
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

Reference

RasterImage Class
RasterImage Members
Overload List
Implementing Animation
GetTrueColorValue Method

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.