←Select platform

LoadPsdChannelAsync Method

Summary

Loads the specified channel from the specified PSD file.

Syntax

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

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.

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

channelInfo
a CodecsPsdChannelInfo object to be updated with information about the loaded channel. Pass a null reference for this parameter if channel 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 the normal Load or LoadAsync methods, except that it loads only a channel from a PSD file. It loads the channel specified in the channelIndex.

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

The number of channels in a file is indicated by CodecsPsdImageInfo.Channels. If this number is 0, the file does not contain any channels 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