We had a VB6 program that was used to take a scanned signature image as a set
of screen coordinates.
The VB6 program then converted this into a bitmap file which we used to
embed the signature in certain documents such as invoices.
The code was recently ported to VB.NET. We are using the BitMap and
DataPoint objects to convert the data to a bitmap file, then saving it using
a .NET PictureBox.
The problem is that apparently the bitmap output of the .NET program is
different than then output of the VB6 program. For one thing, the file size
is much smaller. Also, the image will not appear in MS Paint (though it is
viewable in Windows Picture And Fax Viewer) , therefore when it is embedded
into the document it will not show.
The requirements for the bitmap file are that the horizontal and vertical
resolutions need to be 63 and that the BitDepth is set to 1. In .NET however,
there is no BitDepth associated with the BitMap object so this is one of the
suspected causes.
Another suspected cause is our code to save the bitmap. We tried to change
the code to:
picBox.Image.Save(Imaging.ImageFormat.BMP)
but we got an "Out Of Memory" message.
Please can someone help us with this? Our main question is how has the
bitmap file format changed from VB6 so that a default bitmap image created
and saved in .NET will NOT show in MS Paint? And what property or code we use
to change the format to a version that is viewable in MS Paint?