Solved

GETDIB.

Posted on 2004-03-22
3
499 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 67
Installing Microsoft R server on REDHAT or SUSE Linux 4 136
Error on moodle after upgrade 3 130
Replacement selected text 2 61
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ā€¦
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now