Language Reference
Documentation

Language

Objects
Internet Objects

Picture Class

Has Constructor: NO, Can Create Instance: YES
Can Subclass: NO

The picture object represents an image. You can obtain an image file as a picture object with the OpenAsPicture method of the File object. You can also create a picture object from scratch using the global method newpicture().

See Also: File,Graphics,NewPicture

Methods

IndexedImage
Syntax: IndexedImage(Index as Integer) as picture

If the picture represents an image with indexed images. IndexedImage will return the image as a picture object. The property ImageCount indicates the number of images in the picture.

Properties

Height
Data Type: Integer

The height of the picture.

Width
Data Type: Integer

The width of the picture.

Graphics
Data Type: Graphics

The picture itself. See the graphics object.

Mask
Data Type: Picture

A 256 bit gray picture used to manipulate the transparency of the picture. In window this is a 1 bit black and white mask. Only available in 32 bits pictures.

ImageCount
Data Type: Integer

The number of images in an indexed picture.

HorizontalResolution
Data Type: Integer

The horizontal resolution of the picture. This property is readonly.

VerticalResolution
Data Type: Integer

The vertical resolution of the picture. This property is readonly.

Depth
Data Type: Integer

The depth of the picture in bytes. This property is readonly.

Transparent
DataType: Integer

Setting the value to 1 will make pixels in white transparent. A value of 0 has no effect.

Sample Code

dim f as file,p as picture

//Gets the current folder
f = getfile("myimage.bmp")

p = f.openaspicture()