Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class PsdReader
- Object
- 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.
Fields
public static final int MAX_DIMENSION = 300000 | The largest width or height read: Photoshop’s own PSB limit. |
public static final int MAX_LAYERS = 10000 | The most layers read. |
Methods
public static ArtDocument read(InputStream in)
throws IOException | Reads a PSD or PSB file. |
public static ArtDocument read(byte[] data)
throws IOException | Reads a PSD or PSB file from bytes. |
Inherited methods
Field details
MAX_DIMENSION
public static final int MAX_DIMENSION = 300000MAX_LAYERS
public static final int MAX_LAYERS = 10000Method details
read
public static ArtDocument read(InputStream in)
throws IOExceptionParameters
inInputStream- the file; read to its end, not closed
Throws
read
public static ArtDocument read(byte[] data)
throws IOExceptionParameters
databyte[]- the file