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

NameTypeAccessDescription
widthintReadGets the width of the image in pixels.
heightintReadGets the height of the image in pixels.
channelsintReadGets the number of channels in the image (e.g., 3 for RGB).
bitDepthintReadGets the bit depth per channel (e.g., 8, 16, 32).
colorModeColorModesRead/WriteGets the color mode of the image.
versionintReadGets the raw PSD container version: 1 for PSD and 2 for PSB.
largeDocumentbooleanReadGets a value indicating whether the document uses the PSB large-document container.
PSD_SIGNATUREintReadShared PSD/PSB file signature value (0x38425053 = ‘8BPS’).
PSB_SIGNATUREintReadShared PSD/PSB file signature value (0x38425053 = ‘8BPS’).
PSD_VERSIONshortReadPSD version value.
PSB_VERSIONshortReadPSB large-document version value.

Methods

SignatureDescription
getWidth() → intGets the width of the image in pixels.
getHeight() → intGets the height of the image in pixels.
getChannels() → intGets the number of channels in the image (e.g., 3 for RGB).
getBitDepth() → intGets the bit depth per channel (e.g., 8, 16, 32).
getColorMode() → ColorModesGets the color mode of the image.
getVersion() → intGets the raw PSD container version: 1 for PSD and 2 for PSB.
isLargeDocument() → booleanGets a value indicating whether the document uses the PSB large-document container.
load(reader: BigEndianReader) → PsdHeaderLoads 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.

See Also