Change color in bitmap on web form
Hi,
I've seen quite a bit on changing a selected RGB color to another in a image within a Windows Form, but not in a Web Form.
I've come close with trying ColorMap but when I try to create ImageAttributes the test image doesn't render.
Here's a snippet (and yes, it's VB.net) where the red pixels would change to blue:
Dim imgAtts As ImageAttributes = New ImageAttributes()
Dim clrMap(1) As ColorMap
clrMap(0) = New ColorMap()
clrMap(0).OldColor = Color.FromArgb(255, 0, 0)
clrMap(0).NewColor = Color.FromArgb(0, 0, 255)
Dim strX As String
Try
imgAtts.SetRemapTable(clrMap, ColorAdjustType.Default)
strX = "YES!"
Catch
strX = "Nope"
End Try
Any ideas?
Thanks,
Walks