LoadLayer method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int LoadLayer (AnsiString szName, int iBitsPerPixel, int iLayer);

Delphi Syntax

Function LoadLayer (szName: String; iBitsPerPixel: Integer; iLayer: Integer): Integer;

Overview

Refer to Layers in Files

Remarks

Loads a layer from a file that contains layers. To determine whether a file contains layers, check the InfoLayers property.

Currently, only PSD files support layers, but not all PSD files contain layers.

The layers are numbered starting with 0. The first layer is 0; the second layer is 1, etc. Call the GetFileInfo method to update the InfoLayers property. The last layer in the file is InfoLayers - 1.

After a layer is loaded, the LayerLeft [0] and LayerTop [0] properties can be examined for positioning information on this layer.

See Also

Elements:

LayerLeft property, LayerTop property, Save method, SaveLayers property, GetFileInfo method, InfoLayers property

Topics:

Raster Images: Loading Files