Re: Saving a buffer as a bitmap?
- From: "Mike D Sutton" <EDais@xxxxxxxx>
- Date: Thu, 19 Jan 2006 11:48:39 -0000
> Mike - thanks for the reply! Your code was one of the ways I tried,
> but failed.
Really? Hmm, that's odd. Did you take out the check for a DIB (the valid
data pointer?) If not then it will just exit right at the top even though
the rest of the code should cope with it properly (although it is untested.)
If this still doesn't work then let me know and I'll take a look at it.
> Will using a DIB instead of a DDB be identical, other than the BMP
> saving routine? The code draws on the buffer using mainly simple
> rectangles and text, and then it's bitblted to a preview window.
As far as your GDI drawing code is concerned, yes it will be exactly the
same however it will be stored independently of the display resolution. For
example if the user is running on an 8-bit display and you create a 24-bit
buffer you will get all the graphics processing done as a 24-bit buffer,
where as if you're using a DDB then it will all be converted to 8-bit (DDBs
are used for display use only.)
By the sounds of it your application is more suited to DIBSections if you're
writing the buffers to disk.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/
.
- Follow-Ups:
- Re: Saving a buffer as a bitmap?
- From: Mike D Sutton
- Re: Saving a buffer as a bitmap?
- References:
- Saving a buffer as a bitmap?
- From: inchthickcrema
- Re: Saving a buffer as a bitmap?
- From: Mike D Sutton
- Re: Saving a buffer as a bitmap?
- From: Tom
- Saving a buffer as a bitmap?
- Prev by Date: Re: Saving a buffer as a bitmap?
- Next by Date: Re: Saving a buffer as a bitmap?
- Previous by thread: Re: Saving a buffer as a bitmap?
- Next by thread: Re: Saving a buffer as a bitmap?
- Index(es):
Relevant Pages
|