HI

>
> Is that function public (from a library somewhere) or is it in your own
> library?

 I'm starting to go nuts over all these different bitmap
> formats.

Ignore al the formats you can and stick to Dib-Sections.  They will serve
you best.

 Every time when I finish some code where I need to use them I
> think I 'get' it, only to find out that two weeks later I have to stare
> at MSDN and my Petzold again for hours before I figure out whether I
> should use DIB's or DDB's and how I should load the data from the format
> that I need and manipulate the image data...
>

The original DDB is dependant on the current display colour depth and
organisation of RGB colours ( they may be different for each make - model of
video card - driver )  You can't save them directly - you shouldn't want to
due to there device dependants.  They are mentioned as speeding things up
for drawing etc as they don't have to convert to the correct colour depth
etc per draw/selection.  This speed increase in my opinion is pretty much a
relic of older hardware (think 486) considerations.  Ignore DDB's

The DibSection will allow ease of use, its pretty fast and will allow you to
easily save it.  While not quite as fast as a DDB you (probably) won't
notice it on a Pentium class machine anyhow.  They also allow you direct
access to the pixels so you can manipulate the image.

In short use DibSections as they offer the best Bitmap use on Windows GDI,
forget DDB's. etc

To use DibSections use CreateDibSection();

Max





Reply via email to