Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class PsdWriter
- Object
- PsdWriter
Writes an ArtDocument as a layered Photoshop PSD: RGB, 8 bits per channel, RLE.
Groups become Photoshop groups with their blend mode, pass through included, and every other node becomes a pixel layer keeping its name, opacity, blend mode and visibility. A node Photoshop cannot hold as it is – a shape, text, a node with effects, masks or a clip path, an adjustment – is rendered to pixels first; an adjustment is rendered over the content below it. The merged image is the whole document, rendered.
Methods
public static void write(ArtDocument doc, OutputStream out)
throws IOException | Writes the document. |
public static byte[] toBytes(ArtDocument doc)
throws IOException | Returns the document as PSD bytes. |
Inherited methods
Method details
write
public static void write(ArtDocument doc, OutputStream out)
throws IOExceptionWrites the document.
Parameters
docArtDocument- the document
outOutputStream- receives the file; not closed
Throws
toBytes
public static byte[] toBytes(ArtDocument doc)
throws IOExceptionReturns the document as PSD bytes.
Parameters
docArtDocument- the document