Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Loading bitmap portions

Posted on 1998-09-01
4
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 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