Picture.Constructor(width as Integer, height as Integer, Depth as Integer)
Creates a Picture instance using the passed width, height, and depth parameters. Both Width and Height must be in the range 1 - 32767, otherwise an OutOfBoundsException will be raised.
Width and Height specify the size of the picture and are in pixels. Depth specifies the pixel depth of the picture and can be 0, 1, 2, 4, 8, 16, or 32. If you specify a depth of zero, a picture with no pixel map at all is created, but with a preinitialized Objects property. Use this option for creating vector graphics pictures via the set of Object2D subclasses.
|NOTE: Cocoa always uses 32-bit picture depth regardless of the value you specify for Depth.|
Updating "old" Pictures
Pictures loaded from disk, databases, project files, or Picture.FromData continue to return pictures with masks. This is required for legacy compatibility, but masked Pictures can be converted to a Picture with an alpha channel with the following code:
If input.hasAlphaChannel Then Return input
Dim result As New Picture( input.Width, input.Height )
result.Graphics.DrawPicture( input, 0, 0 )
The following creates a new Picture instance.
Dim height As Integer = 2000
// creates new picture
Dim pic As New Picture(width, height, 32)