Solved

Loading bitmap portions

Posted on 1998-09-01
4
214 Views
Last Modified: 2010-04-30
Lets say you have a really large bitmap file, one too large to completely load into the computer's memory.  Can you load and display only a selected area of the bitmap without loading the rest of the bitmap into the computer's memory?
0
Comment
Question by:totalitary
  • 2
4 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1432465
First, no bitmap is too large to fit in computer's memory. Even if it's 1600x1200x24 colors, it won't take more then 6MB. IF you just want to display part of it, you can load it to a hidden picture box, and then use PaintPicture to transfer part of it to another box or form. If you still want to read only part of it, you will have to do that manualy, there's no built in way for it
0
 

Author Comment

by:totalitary
ID: 1432466
The image is 6ft by 4ft so its not possible to load it into memory without waiting 30 minutes.
0
 
LVL 2

Accepted Solution

by:
polygon earned 200 total points
ID: 1432467
You'll need to learn the BMP file structure. It is smth like:

BITMAPHEADER a
BITMAPINFOHEADER b
PALLETE c
THEBITMAP d

then you read just this part that you need.
Say, you get the headers to see how you bitmap is compressed and some other info to help you read the actual info you need. Then say read just bytes starting at position 1234 to 1334, 4567 to 5667, ... to get just a given rectangle of your bitmap.
0
 

Author Comment

by:totalitary
ID: 1432468
Does anyone know the BMP header stucture and how would you tranfer the information from the chosen bytes to the screen?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
using Access 8 84
Saving history changes to sub form 4 52
bit defender blocks good applications 2 106
Protecting vb6 & .Net code Obfuscation 18 183
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question