473,563 Members | 2,635 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.Sa ve(Imaging.Imag eFormat.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 1243

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

Similar topics

2
7483
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 *.setAttribute and *.appendChild. Except "image" element. When 'image' element is created like this, it doesn't display anything. When I create that element...
2
3009
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: private Graphics m_gMapImg; private Bitmap m_backroundImage; private Bitmap MapImg; private PictureBox m_DrawArea;
2
6061
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 EVERYTIME. I am correctly passing the handles to the function (to the best of my knowledge at least) but it just refuses to create a bitmap in memory...
5
1238
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 to create it dynamically. I've put together an aspx.vb page which creates a rectangle as a jpeg in the colour passed via the url. My idea being to...
7
2292
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, the other in which I close the FileStream afterwards, although both return the same error. Here are the two versions of the code and the errors they...
2
2594
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 located at (x,y)=(10,20) (upper-left hand corner) and is 50x50 in size of the source Bitmap. A sub-Bitmap if you will, sort of the equivalent to...
1
3785
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 expand on one of the example programs in the book but I'm having some problems. I can get a frame to appear, then an image gets randomly placed in...
3
2937
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 after loading I've looked at most of the samples on the web in using GDI+... they all fall over dead with these large files. Any help is...
3
5440
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 access, int size) {
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5481
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
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 we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.