Class PsdReader
java.lang.Object
com.codename1.art.PsdReader
Reads Photoshop PSD and PSB files into an ArtDocument.
Each pixel layer becomes a RasterNode, each group a GroupNode (pass through or
isolated), each adjustment layer an AdjustmentNode, and each solid or gradient fill
layer a ShapeNode over the canvas. Blend modes, opacity, fill opacity, visibility,
clipping masks, layer masks, vector masks and the layer style effects (shadows, glows,
bevel, satin, overlays and stroke) are kept and rendered. Text and smart object layers
are read as the pixels Photoshop stored for them.
RGB, grayscale, CMYK, Lab, indexed, duotone and bitmap images at 1, 8, 16 and 32 bits per channel are read. Without layers, the merged image is the one layer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe largest width or height read: Photoshop's own PSB limit.static final intThe most layers read. -
Method Summary
Modifier and TypeMethodDescriptionstatic ArtDocumentread(byte[] data) Reads a PSD or PSB file from bytes.static ArtDocumentread(InputStream in) Reads a PSD or PSB file.
-
Field Details
-
MAX_DIMENSION
public static final int MAX_DIMENSIONThe largest width or height read: Photoshop's own PSB limit.- See Also:
-
MAX_LAYERS
public static final int MAX_LAYERSThe most layers read.- See Also:
-
-
Method Details
-
read
Reads a PSD or PSB file.
Parameters
in: the file; read to its end, not closed
- Throws:
IOException
-
read
Reads a PSD or PSB file from bytes.
Parameters
data: the file
- Throws:
IOException
-