PsdHeader
Overview
PsdHeader is a class in Aspose.PSD FOSS for Java.
Contains the header information of a Photoshop document.
This class declares 10 methods for PsdHeader objects in Java programs.
Available methods include: getBitDepth, getChannels, getColorMode, getHeight, getVersion, getWidth, isLargeDocument, load, save, setColorMode.
Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package.
Properties: PSB_SIGNATURE, PSB_VERSION, PSD_SIGNATURE, PSD_VERSION, bitDepth, channels, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
width | int | Read | Gets the width of the image in pixels. |
height | int | Read | Gets the height of the image in pixels. |
channels | int | Read | Gets the number of channels in the image (e.g., 3 for RGB). |
bitDepth | int | Read | Gets the bit depth per channel (e.g., 8, 16, 32). |
colorMode | ColorModes | Read/Write | Gets the color mode of the image. |
version | int | Read | Gets the raw PSD container version: 1 for PSD and 2 for PSB. |
largeDocument | boolean | Read | Gets a value indicating whether the document uses the PSB large-document container. |
PSD_SIGNATURE | int | Read | Shared PSD/PSB file signature value (0x38425053 = ‘8BPS’). |
PSB_SIGNATURE | int | Read | Shared PSD/PSB file signature value (0x38425053 = ‘8BPS’). |
PSD_VERSION | short | Read | PSD version value. |
PSB_VERSION | short | Read | PSB large-document version value. |
Methods
| Signature | Description |
|---|---|
getWidth() → int | Gets the width of the image in pixels. |
getHeight() → int | Gets the height of the image in pixels. |
getChannels() → int | Gets the number of channels in the image (e.g., 3 for RGB). |
getBitDepth() → int | Gets the bit depth per channel (e.g., 8, 16, 32). |
getColorMode() → ColorModes | Gets the color mode of the image. |
getVersion() → int | Gets the raw PSD container version: 1 for PSD and 2 for PSB. |
isLargeDocument() → boolean | Gets a value indicating whether the document uses the PSB large-document container. |
load(reader: BigEndianReader) → PsdHeader | Loads the fixed PSD/PSB file header from the reader. |
save(writer: BigEndianWriter) | Writes the fixed PSD/PSB file header to the writer. |
setColorMode(colorMode: ColorModes) | Updates the header color mode for the compatibility subset that rewrites header metadata. |