Bitmap?

3 posts / 0 new
Last post
alfkil
alfkil's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2011-05-10 22:02
Bitmap?

Is there some straightforward way to write a series of one bitplane bits from memory and into a 1-bitplane BitMap? I don't think any of the WritePixelArray functions (graphics.library and P96) does it correctly, at least not in any of my tests... Maybe because there is no RGBFormat corresponding to mono (1-bit).

thomas
thomas's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2011-05-16 14:23
struct BitMap
  1. struct BitMap mybitmap;
  2. InitBitMap (&mybitmap,1,width,height);
  3. mybitmap.Planes[0] = mybitplane;

Note that width is rounded up to the next number which is divisible by 16.

alfkil
alfkil's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2011-05-10 22:02
@thomas Thanks! Ok, I

@thomas

Thanks!

Ok, I thought that it was illegal to initialize bitmap structures by hand. But if it works, it works :)

Log in or register to post comments