Re: [AD] image loading flags

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2011-06-15, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> On Wed, Jun 15, 2011 at 6:55 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > ALLEGRO_KEEP_FORMAT and ALLEGRO_NO_PREMULTIPLIED_ALPHA do not belong
> > with the bitmap flags.  Luckily the former was never implemented.
> > Now we have ALLEGRO_KEEP_INDEX as well.
> >
> Is the distinction those flags which affect loading and those which
> affect the bitmap creation and subsequent operations?

The distinction is between parameters which tweak how certain functions
convert data on disk to memory, and flags which describe what an object
actually is and how to work with it.

> Why does the distinction matter?

Ultimately we can live with it so it doesn't matter, but it's ugly and a
source of confusion.  I remember having to clarify on a.cc that
NO_PREMULTIPLIED_ALPHA actually only affects loading, that there no
special type of bitmap with that flag set.  It's easy to build up the
wrong model in your head.  That should at least be solved by distinctly
separating the different kinds of flags in the documentation.

Since I wrote the original message, I remembered that the font addons do
check the NO_PREMULTIPLIED_ALPHA flag to infer what kind of blending you
expect to use.  I haven't thought of a solution for that.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/