Click here to Skip to main content
16,009,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get and set colors of the each pixel in a bitmap? Pin
chen14-Nov-01 14:25
chen14-Nov-01 14:25 
AnswerRe: How to get and set colors of the each pixel in a bitmap? Pin
Christian Graus14-Nov-01 14:29
protectorChristian Graus14-Nov-01 14:29 
AnswerRe: How to get and set colors of the each pixel in a bitmap? Pin
chen14-Nov-01 14:46
chen14-Nov-01 14:46 
GeneralRe: How to get and set colors of the each pixel in a bitmap? Pin
Christian Graus14-Nov-01 14:49
protectorChristian Graus14-Nov-01 14:49 
GeneralRe: How to get and set colors of the each pixel in a bitmap? Pin
chen14-Nov-01 14:59
chen14-Nov-01 14:59 
GeneralRe: How to get and set colors of the each pixel in a bitmap? Pin
chen14-Nov-01 15:09
chen14-Nov-01 15:09 
GeneralRe: How to get and set colors of the each pixel in a bitmap? Pin
Christian Graus14-Nov-01 15:55
protectorChristian Graus14-Nov-01 15:55 
GeneralRe: How to get and set colors of the each pixel in a bitmap? Pin
Christian Graus14-Nov-01 15:57
protectorChristian Graus14-Nov-01 15:57 
chen wrote:
The CDIB class i used is wrote by Jorge Lodos (lodos@cigb.edu.cu) in 1998.
But there is no GetPixel and SetPixel function.


Like I said, Get/SetPixel are methods of CDC.

chen wrote:
LPBYTE m_pBits;


There's your pointer to the bitmap data, just like I said. I suggest you write a Get/SetPixel method to work with this, it will be nice and fast then, although not as fast as iterating through in a tight loop.

Do you need to deal with paletised images ? How about 16 bit ? Both of those will be a pain, 24/32 bit is nice and easy.



Christian

After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
GeneralNewB question of the day Pin
RobJones14-Nov-01 11:20
RobJones14-Nov-01 11:20 
GeneralRe: NewB question of the day Pin
Bill Wilson14-Nov-01 11:25
Bill Wilson14-Nov-01 11:25 
GeneralColor Usage in CreateDIBitmap Pin
AJ12314-Nov-01 11:20
AJ12314-Nov-01 11:20 
GeneralUsing Server Idle Time Pin
AJ12314-Nov-01 11:10
AJ12314-Nov-01 11:10 
GeneralRe: Using Server Idle Time Pin
Anders Molin14-Nov-01 14:22
professionalAnders Molin14-Nov-01 14:22 
GeneralInteraction Pin
Ever123414-Nov-01 9:26
Ever123414-Nov-01 9:26 
GeneralRe: Interaction Pin
Anders Molin14-Nov-01 14:26
professionalAnders Molin14-Nov-01 14:26 
GeneralRe: Interaction Pin
Mark Terrano16-Nov-01 11:55
Mark Terrano16-Nov-01 11:55 
GeneralStatusBar in a Dialog Pin
14-Nov-01 7:16
suss14-Nov-01 7:16 
GeneralCDC... I wan't the client area HOW TO Pin
Remi Morin14-Nov-01 5:38
Remi Morin14-Nov-01 5:38 
GeneralRe: CDC... I wan't the client area HOW TO Pin
14-Nov-01 7:13
suss14-Nov-01 7:13 
GeneralTIP: Problems comparing COleDateTime objects + COleDateTimeSpan accumulated errors Pin
14-Nov-01 5:28
suss14-Nov-01 5:28 
GeneralRe: TIP: Problems comparing COleDateTime objects + COleDateTimeSpan accumulated errors Pin
Bill Wilson15-Nov-01 14:05
Bill Wilson15-Nov-01 14:05 
QuestionIs it possible to change style only of some region in dialog? Pin
14-Nov-01 5:22
suss14-Nov-01 5:22 
AnswerRe: I guess not Pin
Paolo Messina14-Nov-01 7:12
professionalPaolo Messina14-Nov-01 7:12 
AnswerRe: Is it possible to change style only of some region in dialog? Pin
Nish Nishant14-Nov-01 16:56
sitebuilderNish Nishant14-Nov-01 16:56 
GeneralRe: Is it possible to change style only of some region in dialog? Pin
14-Nov-01 22:24
suss14-Nov-01 22:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.