Leadtools.Codecs Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.17
SavePsdWithLayers Method
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class : SavePsdWithLayers Method




image
The image to save.
fileName
The output file name.
bitsPerPixel
Resulting file's pixel depth. For color images this can be 24 or 32. For grayscale images this can be 8.
layerImages
An RasterImage object that contains layers (in each page) to save in the output file. The layers should have the same bits per pixel as the file. Every page in the image will be saved as a layer. The first page in the image will be interpreted as the first layer. The pages in the image must have the same bits per pixel as specified in bitsPerPixel.
layerInfos
An optional array of CodecsPsdLayerInfo objects. If this is a null reference (Nothing in Visual Basic), then each layer will start at (0, 0) and will have the same size as the image. If this is not a null reference (Nothing in Visual Basic), then the layer information for each layer in layersInfo will be stored here.The number of CodecsPsdLayerInfo objects must be the same as the number of pages in layerImages.
Saves an image to a PSD file, along with the specified layers.

Syntax

Visual Basic (Declaration) 
Public Sub SavePsdWithLayers( _
   ByVal image As RasterImage, _
   ByVal fileName As String, _
   ByVal bitsPerPixel As Integer, _
   ByVal layerImages As RasterImage, _
   ByVal layerInfos() As CodecsPsdLayerInfo _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim image As RasterImage
Dim fileName As String
Dim bitsPerPixel As Integer
Dim layerImages As RasterImage
Dim layerInfos() As CodecsPsdLayerInfo
 
instance.SavePsdWithLayers(image, fileName, bitsPerPixel, layerImages, layerInfos)
C# 
public void SavePsdWithLayers( 
   RasterImage image,
   string fileName,
   int bitsPerPixel,
   RasterImage layerImages,
   CodecsPsdLayerInfo[] layerInfos
)
Managed Extensions for C++ 
public: void SavePsdWithLayers( 
   RasterImage image,
   string* fileName,
   int bitsPerPixel,
   RasterImage layerImages,
   CodecsPsdLayerInfo*[] layerInfos
) 
C++/CLI 
public:
void SavePsdWithLayers( 
   RasterImage image,
   String^ fileName,
   int bitsPerPixel,
   RasterImage layerImages,
   array<CodecsPsdLayerInfo^> layerInfos
) 

Parameters

image
The image to save.
fileName
The output file name.
bitsPerPixel
Resulting file's pixel depth. For color images this can be 24 or 32. For grayscale images this can be 8.
layerImages
An RasterImage object that contains layers (in each page) to save in the output file. The layers should have the same bits per pixel as the file. Every page in the image will be saved as a layer. The first page in the image will be interpreted as the first layer. The pages in the image must have the same bits per pixel as specified in bitsPerPixel.
layerInfos
An optional array of CodecsPsdLayerInfo objects. If this is a null reference (Nothing in Visual Basic), then each layer will start at (0, 0) and will have the same size as the image. If this is not a null reference (Nothing in Visual Basic), then the layer information for each layer in layersInfo will be stored here.The number of CodecsPsdLayerInfo objects must be the same as the number of pages in layerImages.

Example

For an example, refer to LoadPsdLayer.

Remarks

Use this method to save PSD files with layers.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also