vectorcraft/crates/render/src/encode
bflatastic c06c13f577 M4.70: PSD export, flat or with layers, groups for sublayers and text layers named after their text
document.export {format: "psd"} writes layered bitmaps (8 bits per channel),
written from the format's public specification: RGB, CMYK (ink amounts) or
grayscale, the resolution and an embedded profile, PackBits channels, and the
merged image (the flat render). layers (default true) draws each top-level
layer alone as a pixel layer, cropped to what it paints, with its name,
opacity and blend mode; a background colour becomes a Background layer.
maxEditability turns layers and sublayers into groups and every object into a
layer named as the Layers panel names it (text by its text); clipping, masked,
knockout or appearance-carrying layers stay one layer. hiddenLayers writes
hidden layers hidden instead of leaving them out; layers: false writes a flat
image on white. At most 30000 pixels a side.

Export As offers PSD with the psdOptions dialog (the PNG Options rows, then
Color Model, Flat Image / Write Layers with Maximum Editability and Include
Hidden Layers, Embed ICC Profile). Tests read the files back with the psd
crate (MIT OR Apache-2.0, a dev-dependency).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 16:12:03 +07:00
..
bmp.rs M4.68: BMP export at 1 to 32 bits, Windows or OS/2, with RLE and flipped rows 2026-10-05 15:24:35 +07:00
gif.rs M4.49: PNG-8 and GIF export with a palette quantizer and dithering 2026-10-05 11:26:15 +07:00
jpeg.rs M4.67: TIFF export in RGB, CMYK or grayscale, with LZW, either byte order and the profile 2026-10-05 15:24:29 +07:00
mod.rs M4.70: PSD export, flat or with layers, groups for sublayers and text layers named after their text 2026-10-05 16:12:03 +07:00
png.rs M4.90: Save for Web (Legacy) previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML 2026-10-05 15:24:51 +07:00
psd.rs M4.70: PSD export, flat or with layers, groups for sublayers and text layers named after their text 2026-10-05 16:12:03 +07:00
quantize.rs M4.90: Save for Web (Legacy) previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML 2026-10-05 15:24:51 +07:00
tests.rs M4.33: Export As with Use Artboards (All or a range) and art bounds 2026-10-05 09:14:42 +07:00
tests_bmp.rs M4.68: BMP export at 1 to 32 bits, Windows or OS/2, with RLE and flipped rows 2026-10-05 15:24:35 +07:00
tests_jpeg.rs M4.48: JPEG Options — RGB/CMYK/gray, baseline/optimized/progressive, embedded ICC profiles and image maps 2026-10-05 11:25:09 +07:00
tests_palette.rs M4.49: PNG-8 and GIF export with a palette quantizer and dithering 2026-10-05 11:26:15 +07:00
tests_psd.rs M4.70: PSD export, flat or with layers, groups for sublayers and text layers named after their text 2026-10-05 16:12:03 +07:00
tests_tga.rs M4.69: Targa export at 16, 24 or 32 bits per pixel 2026-10-05 15:24:51 +07:00
tests_tiff.rs M4.67: TIFF export in RGB, CMYK or grayscale, with LZW, either byte order and the profile 2026-10-05 15:24:29 +07:00
tests_web.rs M4.90: Save for Web (Legacy) previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML 2026-10-05 15:24:51 +07:00
tga.rs M4.69: Targa export at 16, 24 or 32 bits per pixel 2026-10-05 15:24:51 +07:00
tiff.rs M4.67: TIFF export in RGB, CMYK or grayscale, with LZW, either byte order and the profile 2026-10-05 15:24:29 +07:00
web.rs M4.90: Save for Web (Legacy) previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML 2026-10-05 15:24:51 +07:00