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
Solved

GETDIB.

Posted on 2004-03-22
3
500 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
  • 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 100 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 140
haveThree challenge 22 121
zeroFront challenge 7 113
My project did see openJDK that I installed. What could be the problem 7 152
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ā€¦
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

839 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