just wondering if anyone could help with a problem with creating a bitmap from a device context.

i can create the bitmap fine, but when saving the bitmap data, the last line of the bitmap, about the last half of the line is black or just mixed pixels, i think it might be something to do with not saving the full amount of data, but not sure.

if anyone has had this problem before and/or knows how to fix it please tell me.

any help is greatly appreciated, thanks
Posted on 2005-08-22 20:04:58 by someone
might be padding (pitch)
Posted on 2005-08-22 20:28:20 by comrade
padding ?, not quite sure what ya mean
Posted on 2005-08-22 20:59:10 by someone
32-bit row padding would be my guess, but that tends to screw up the entire image, not just the last scanline. Did you personaly write the bitmap load/display routines someone?

Posted on 2005-08-22 22:15:27 by Sparafusile
yeh i wrote it myself
theres not much to it, just fill out the structure and a few api calls

but what is this padding stuff ?
Posted on 2005-08-23 04:49:20 by someone
ok, nevermind i've worked out what the problem is
Posted on 2005-08-23 05:05:10 by someone
...it would be helpful if you told what the problem is, so similar problems can be troubleshooted easier in the future.

My guess would be a off-by-one error in the height member of the bitmap info record?
Posted on 2005-08-23 05:19:57 by f0dder
yep, thats what the problem was
height was one too small
thanks anyway
Posted on 2005-08-23 05:25:50 by someone