←Select platform

LoadPsdLayerAsync Method

Summary

Loads the specified layer from the specified PSD file.

Syntax

C#
VB
WinRT C#
C++
public IAsyncOperation<RasterImage> LoadPsdLayerAsync(  
   ILeadStream stream, 
   int bitsPerPixel, 
   Leadtools.Codecs.CodecsLoadByteOrder order, 
   int layer, 
   Leadtools.Codecs.CodecsPsdLayerInfo layerInfo 
) 
Public Function LoadPsdLayerAsync( _ 
   ByVal stream As ILeadStream, _ 
   ByVal bitsPerPixel As Integer, _ 
   ByVal order As Leadtools.Codecs.CodecsLoadByteOrder, _ 
   ByVal layer As Integer, _ 
   ByVal layerInfo As Leadtools.Codecs.CodecsPsdLayerInfo _ 
) As IAsyncOperation(Of RasterImage) 
public IAsyncOperation<RasterImage> LoadPsdLayerAsync(  
   ILeadStream stream, 
   int bitsPerPixel, 
   Leadtools.Codecs.CodecsLoadByteOrder order, 
   int layer, 
   Leadtools.Codecs.CodecsPsdLayerInfo layerInfo 
) 
 function Leadtools.Codecs.RasterCodecs.LoadPsdLayerAsync(  
   stream , 
   bitsPerPixel , 
   order , 
   layer , 
   layerInfo  
) 
public: 
IAsyncOperation<RasterImage^>^ LoadPsdLayerAsync(  
   ILeadStream^ stream, 
   int bitsPerPixel, 
   Leadtools.Codecs.CodecsLoadByteOrder order, 
   int layer, 
   Leadtools.Codecs.CodecsPsdLayerInfo^ layerInfo 
)  

Parameters

stream
The input PSD stream.

bitsPerPixel
Resulting image pixel depth. Valid values are:

Value Meaning
0 Keep the original file's pixel depth (Do not convert).
1 to 8 The specified bits per pixel in the resulting image.
12 12 bits per pixel in the resulting image.
16 16 bits per pixel in the resulting image.
24 24 bits per pixel in the resulting image.
32 32 bits per pixel in the resulting image.
48 48 bits per pixel in the resulting image.
64 64 bits per pixel in the resulting image.

order
The desired color order.

layer
Index of the layer to load. This index is zero-based. Pass 0 to load the first layer, 1 to load the second layer, etc.

layerInfo
a CodecsPsdLayerInfo object to be updated with information about the loaded layer. Pass a null reference for this parameter if layer information is not needed.

Return Value

When this method completes, it returns the RasterImage object that this method loads.

Remarks

Use this method to load PSD files only.

This method works similarly to a normal Load or LoadAsync methods, except that it loads only a layer from a PSD file. It loads the layer specified in layer.

Before calling this method, you may need to get or set file information, such as the number of layers on the file. Refer to CodecsPsdImageInfo.

The number of layers in a file is indicated by CodecsPsdImageInfo.Layers. If this number is 0, the file does not contain any layers and this method should not be called.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly