473,499 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem creating Bitmap in VB6 vs VB.NET

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?
Jul 13 '06 #1
0 1229

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7479
by: MiW | last post by:
Hi I'm making a kind of JavaScript-based library for creating SVG objects/elements. And I hit the wall... Every element (rect, circle etc.) can be created using *.createElement, then...
2
2996
by: Sharon | last post by:
I encountered a strange behavior when doing ‘new Bitmap’: The following code works fine and the given bitmap file is shown on the PictureBox (the m_DrawArea) in the correct bitmap sizes: ...
2
6053
by: Juan Romero | last post by:
Guys, I am trying to capture the desktop screen (everything). I am having a problem with the "CreateCompatibleBitmap" API call. For some reason the function is creating a 1x1 pixels bitmap...
5
1225
by: Brian Cryer | last post by:
I'm developing a website and for one of the pages I need to create a number of coloured rectangles - its part of a legend and the user has control over the actual colours used which is why I want...
7
2283
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
2
2579
by: Peter Oliphant | last post by:
I want to create a new Bitmap which is a portion of an existing Bitmap. For example, if I have a Bitmap that is 100x100 in size I might want to create a new Bitmap that is equivalent to the one...
1
3776
by: rsteph | last post by:
I bought a book to help me learn to use DirectX with windows programming. It's first trying to walk me through some basic windows programming and graphics before getting into DirectX. I'm trying to...
3
2934
by: =?Utf-8?B?dGtpZWhs?= | last post by:
I have large 1bpp tiff scans of arch. drawings that are typically 12032x16890 pixels (filesize is about a 1 meg +/-) While I can readily view smaller (dimension) files, when I try to do anything...
3
5427
by: Martin Priebe | last post by:
Hi, i tried to use MMF to communicate between 2 processes. i want to transfer a bitmap between the 2 processes. i created a mmf in my first process public IntPtr CreateMMF(FileAccess...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.