Strange: Picture.HasAlphaChannel

To load an image from disk, I use

[code]Dim My_Pict As Picture

// Removed code

// Load the image
My_Pict = Picture.Open(Image_FI)[/code]

and more lines below, I tested if my image have an Alpha Channel (.HasAlphaChannel): the answer was False.

But my image have an alpha channel !


Good catch, but if there is a mask, I do not add it. I check…

How can I check if a Picture have a Mask ???


Use pic.Mask(False). If there’s no Maks (or if it has an Alpha Channel) pic.Mask(False) should be NIL.

Thanks Sasha.

Nota: before asking this kind of question, I already read the LR. Worst, I read it after writing the question too, but not noticed the Nil part.

Result: no mask.

In the mean time, I changed my code a bit to create another Picture using the one I already had:

[code]My_Pict = Picture.Open(Image_FI)

Emile_Pict = New Picture(My_Pict.Width, My_Pict.Height)[/code]

And now, I get an Alpha Channel in Emile_Pict.

Thanks Sasha.