On Mon, 16 Apr 2007 11:20:55 +0200
Marc Weustink <[EMAIL PROTECTED]> wrote:
> Continuing my TRawImageQuestion.
>
> While implementing cursors and imagelists, Paul and I start to get
> confused. It appears that Mask and Alpha are treated as equal while
> in fact they are each others inverse. (An 1 in a mask means that this
> part of the image is masked, not drawn, where for alpha a 1 means
> opaque, fully drawn)
>
> A RawImageDesription describes the RGB and Alpha parts of an image.
> It has also a flag that the Alpha is separate. This got introduced
> since traditional windows has only an image and a (1bpp) mask.
> When reading such image, the mask gets converted into a 1bit separate
> alpha.
>
> With CreateBitmapFromRawImage the fun starts. It creates a bitmap and
> mask handle form the rawimage. The maskhandle is created from the
> (separate) alpha and is in fact returning an alpha handle and not a
> maskhandle. On win32 this is nonsense since alpha is never separated.
> So I think a Maskhandle should return what it means: a handle to a
> Mask (and only in the case when the description had the AlphaSeparate
> flag).
>
> Comments ?
Maybe we need an enum, how to interpret the alpha value?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives