Class PsdFile
Inheritance
System.Object
PsdFile
Syntax
Constructors
PsdFile(PsdFileVersion)
Declaration
public PsdFile(PsdFileVersion version = PsdFileVersion.Psd)
Parameters
PsdFile(Stream, LoadContext, ELoadFlag)
Declaration
public PsdFile(Stream stream, LoadContext loadContext, ELoadFlag loadFlag = ELoadFlag.Header | ELoadFlag.ColorMode | ELoadFlag.ImageData | ELoadFlag.All)
Parameters
PsdFile(String, LoadContext, ELoadFlag)
Declaration
public PsdFile(string filename, LoadContext loadContext, ELoadFlag loadFlag = ELoadFlag.Header | ELoadFlag.ColorMode | ELoadFlag.ImageData | ELoadFlag.All)
Parameters
Fields
ColorModeData
If ColorMode is ColorModes.Indexed, the following 768 bytes will contain
a 256-color palette. If the ColorMode is ColorModes.Duotone, the data
following presumably consists of screen parameters and other related information.
Unfortunately, it is intentionally not documented by Adobe, and non-Photoshop
readers are advised to treat duotone images as gray-scale images.
Declaration
public byte[] ColorModeData
Field Value
Type |
Description |
System.Byte[] |
|
Properties
AbsoluteAlpha
Declaration
public bool AbsoluteAlpha { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AdditionalInfo
Declaration
public List<LayerInfo> AdditionalInfo { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<LayerInfo> |
|
BaseLayer
Represents the composite image.
Declaration
public Layer BaseLayer { get; set; }
Property Value
BitDepth
The number of bits per channel. Supported values are 1, 8, 16, and 32.
Declaration
public int BitDepth { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ChannelCount
The number of channels in the image, including any alpha channels.
Declaration
public short ChannelCount { get; set; }
Property Value
Type |
Description |
System.Int16 |
|
ColorMode
The color mode of the file.
Declaration
public PsdColorMode ColorMode { get; set; }
Property Value
ColumnCount
The width of the image in pixels.
Declaration
public int ColumnCount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
globalLayerMaskData
Declaration
public byte[] globalLayerMaskData { get; }
Property Value
Type |
Description |
System.Byte[] |
|
ImageCompression
Declaration
public ImageCompression ImageCompression { get; set; }
Property Value
ImageResources
The Image resource blocks for the file
Declaration
public ImageResources ImageResources { get; set; }
Property Value
IsLargeDocument
Declaration
public bool IsLargeDocument { get; }
Property Value
Type |
Description |
System.Boolean |
|
Layers
Declaration
public List<Layer> Layers { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<Layer> |
|
Resolution
Declaration
public ResolutionInfo Resolution { get; set; }
Property Value
RowCount
The height of the image in pixels.
Declaration
public int RowCount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Version
Photoshop file format version.
Declaration
public PsdFileVersion Version { get; }
Property Value
Methods
PrepareSave()
Check the validity of the PSD file and generate necessary data.
Declaration
public void PrepareSave()
Save(Stream, Encoding)
Declaration
public void Save(Stream stream, Encoding encoding)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
System.Text.Encoding |
encoding |
|
Save(String, Encoding)
Declaration
public void Save(string fileName, Encoding encoding)
Parameters
Type |
Name |
Description |
System.String |
fileName |
|
System.Text.Encoding |
encoding |
|
SetVersionInfo()
Set the VersionInfo resource on the file.
Declaration
public void SetVersionInfo()