Picture.HasAlphaChannel not operative for opened pictures ?

I have an application where users can drop pictures over, and I want to make white transparent when the picture has no alpha channel.

So I thought about testing HasAlphaChannel on the newly opened picture and if necessary, turn transparent on.

Dim f as folderItem = SpecialFolder.Child("sign.jpg") dim p as picture = Picture.Open(f) msgbox str(p.HasAlphaChannel)

But if I open a jpg picture which I know for a fact cannot have Alpha Channel, HasAlphaChannel is still true.

Is it normal ?

HasAlphaChannel says if the picture object has an alpha channel.
Not whether the image in the file has one.

I understand, but once the picture has been loaded, should it not retain its features ?

No

Whatever…

That code doesn’t return true for me here with hiDPI off (on OS X)
Does with it on though

With hiDPI on pictures are always loaded as “picture with alpha channel” regardless of the source image type
Never as “picture with mask” - the OLD non-hidpi behavior

Splitting things into picture+mask is expensive and damages the fidelity of the source

See http://developer.xojo.com/hidpi-support
Picture Notes
Pictures in the project, loaded from disk, received from drag and drop, or loaded from data will be loaded as Images if the format supports it. This better preserves color spaces, loads multiple resolutions if the format supports it, and reduces memory usage. Simple bitmap formats will load as Immutable Bitmaps.

OK. That makes sense. Thank you.