[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

GETDIB.

Posted on 2004-03-22
3
Medium Priority
?
507 Views
Last Modified: 2013-11-20
Hi,
   If I have a BITMAP variable , can I change the RGB pixel values directly by accessing the bmBits field?

Is there a need to use GetDIBits() to get the device independent bitmap? What are the repercussions if I do not use GetDIBits and change the pixels directly via BITMAP.bmBits?

Also, how do I get a handle to BITMAP (i.e. HBITMAP)?

Thanks a lot.
0
Comment
Question by:limin123
[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
3 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 10659898
>If I have a BITMAP variable , can I change the RGB pixel values directly by accessing the bmBits field?

Yes, you can. But it is a DDB. Each device has a unique color format. You will have to know the color format of your device and you can't transfer it to other devices.

>Also, how do I get a handle to BITMAP (i.e. HBITMAP)?

No way. But you should know the HBITMAP. Otherwise, how do you get the BITMAP?
0
 
LVL 1

Author Comment

by:limin123
ID: 10663977
So if I am doing image processing, am I better off using the DIB bits since this is a closer representation of what will be stored as a device independent bmp file?

If I am capturing frames from a web cam, will it return the bits as DIB or DDB?

Thanks a lot.

0
 
LVL 23

Accepted Solution

by:
chensu earned 400 total points
ID: 10664574
>So if I am doing image processing, am I better off using the DIB bits since this is a closer representation of what will be stored as a device independent bmp file?

Yes, what are stored in a bmp file are DIB bits.

>If I am capturing frames from a web cam, will it return the bits as DIB or DDB?

It should give you DIB if it is across the network.
0

Featured Post

Independent Software Vendors: 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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 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