Property

Picture.Mask


Warning

This item was deprecated in version 2019r2. Please use Picture.ApplyMask and Picture.CopyMask as a replacement.

Description

Allows you to access a Mask that controls the transparency of the picture. By default, the optional Create parameter is True. When Create is True, the Mask is created automatically; otherwise the Mask is returned, whether or not one exists.

Notes

The Mask property returns Nil when you are using a Picture created with an alpha channel (this includes HiDPI images). You can get at masks by using the CopyMask and ApplyMask methods instead.

Sample code

This example opens a jpeg file and creates a Mask.

Dim p2 As Picture
Dim pic As Picture
Dim f As FolderItem
f = GetOpenFolderItem("image/jpeg")
If f <> Nil Then
  pic = Picture.Open(f)
  p2 = pic.Mask(True)
End If

Compatibility

All project types on all supported operating systems.