Convert wmf to 1bpp monochrome bitmap
Posted: Wed Mar 15, 2017 9:44 pm
Using this code, I'm trying to convert the attached wmf to a 1bpp monochrome bitmap. In the wmf you'll see blue and red color. These colors do not show up in the bmp. What is the proper way to convert the wmf? I know the attached file is a png since I couldn't upload the wmf.
Code: Select all
Using oGdPictureImaging As New GdPicture11.GdPictureImaging
Dim Image As Integer = oGdPictureImaging.CreateGdPictureImageFromFile(WMFFilename)
'oGdPictureImaging.FxBlackNWhiteT(Image, 128)
oGdPictureImaging.FxBlackNWhite(Image, GdPicture11.BitonalReduction.Stucki)
oGdPictureImaging.ConvertTo1BppAT(Image)
oGdPictureImaging.SaveAsBMP(Image, BMPFilename)
oGdPictureImaging.ReleaseGdPictureImage(Image)
End Using