You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Color Mapping & Color Profiles Management > SetColorRemap Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.SetColorRemap Method

Applies a color-remap table to a GdPicture image.

C#
public GdPictureStatus SetColorRemap(
    int ImageID, 
    ref Imaging.ColorMap RemapTable
);
Visual Basic
Public Function SetColorRemap(
    ByVal ImageID As Integer, 
    ByRef RemapTable() As Imaging.ColorMap
) As GdPictureStatus
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier.  
RemapTable 
Array which specifies the color remap table. Each entry is a Imaging.ColorMap oGdPictureImaging.  
Returns

A member of the GdPictureStatus enumeration.

Translate in one call, Blue color by Green, White by Black and Red by Yellow.

Dim arcolor(3) As Imaging.ColorMap
 
arcolor(0).OldColor = Color.Blue
arcolor(0).NewColor = Color.Green
arcolor(1).OldColor = Color.White
arcolor(1).NewColor = Color.Black
arcolor(2).OldColor = Color.Red
arcolor(3).NewColor = Color.Yellow
 
Dim ImageID as Integer = oGdPictureImaging.CreateGdPictureImageFromFile ("input.bmp")
oGdPictureImaging.SetColorRemap(ImageID, arcolor)
oGdPictureImaging.SaveAsBMP (ImageID, "output.bmp")
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.