changing bitmap colors

.paul.

Well-known member
Joined
May 22, 2007
Messages
212
Programming Experience
1-3
i'm trying to change some colors in a bitmap.
this is the code i'm using

VB.NET:
Dim att As System.Drawing.Imaging.ImageAttributes = New System.Drawing.Imaging.ImageAttributes
Dim map As System.Drawing.Imaging.ColorMap = New System.Drawing.Imaging.ColorMap
map.OldColor = Color.FromArgb(0, 0, 0)
map.NewColor = Color.FromArgb(255, 255, 255)

this is the part i can't work out

VB.NET:
att.SetRemapTable(New System.Drawing.Imaging.ColorMap, map)

and i'm not sure how to use the drawimage statement after.
 
Last edited:
Thread moved to Graphics forum. Please post to specialized forums rather than General ones.

SetRemapTable Method have two overloads, first takes a ColorMap as parameter, second takes a ColorMap and a ColorAdjustType value.

About usage you could read How to: Use a Color Remap Table.
 
Back
Top