PDA

View Full Version : Trouble writing a to a bitmap



nickcartwright
11-10-2003, 07:57 AM
Hiya, having a bit of trouble dumping the screen to a project.

Iv written a method that writes bmp files and i have tested. When i read the pixels from my screen however, my bitmap looks like this:

http://www.dcs.warwick.ac.uk/~csvog/problem1.gif

I understand that bitmaps have the Red and Blue inversed, so i simply changed the order which i write out the red and blue and my program outputs this:

http://www.dcs.warwick.ac.uk/~csvog/problem2.gif

It's probably just an error in my coding - but i just thought Id take a long shot and post here to see if anyone else had had the same problem.

Thanks,

Nick.

nickcartwright
11-11-2003, 01:31 AM
Problem now solved!

...dont ask http://www.opengl.org/discussion_boards/ubb/smile.gif

Honk
11-11-2003, 01:04 PM
Looks like missing padding bytes, right?