Monochrome BMP (VB)

mauleTTT

Active member
Joined
Mar 27, 2003
Messages
36
Monochrome BMP

Hi all!

Anyone knows the way to transform any type of BMP picture (with colours) into a monochrome type picture
 
edit with paint
save as Monochrome Bitmap

unless ur trying to do that within the program:
just use 2 bitmaps
1 colr and 1 mono. and then use the GDI+ to display the mono ontop of te color
 
Theres another quite easy solution:

Code:
Dim source As New Bitmap("C:\myColoredImage.jpg")
Dim dest As New Bitmap(source.Width, source.Height)
Dim destGraph As Graphics = Graphics.FromImage(dest)
ControlPaint.DrawImageDisabled(destGraph, source, 0, 0, Color.Empty)
destGraph.Dispose()
dest.Save("C:\myGrayscaleImage.jpg")
 
Back
Top