Picture.HasAlphaChannel

From Xojo Documentation
Jump to: navigation, search
Property (As Boolean)
The property is read-only.

BooleanValue = aPicture.HasAlphaChannel

True if the Picture has an alpha channel.

Notes

A Picture that is created with the constructor that omits the Depth parameter has an alpha channel and old pictures can be converted to this format with the following code:

Function ModernizePicture(input As Picture) As Picture
If input.HasAlphaChannel Then Return input

Dim result As New Picture( input.Width, input.Height )
result.Graphics.DrawPicture( input, 0, 0 )
Return result
End Function

For pictures using masks, HasAlphaChannel returns False.

Personal tools
Namespaces

Variants
Actions
Main
Documentation
Community
Toolbox
Help