Export & Import
Paint Forge supports multiple export formats, clipboard operations, image import via drag-and-drop, and automatic local and cloud saving. This page covers all the ways to get your work in and out of the editor.
Export Formats
Open the Export dialog from File > Export or the command palette. The available formats cover both raster and vector output.
| Format | Type | Details |
|---|---|---|
| PNG | Lossless | Full quality with alpha channel support. Transparent backgrounds are preserved when the canvas transparency setting is enabled. |
| JPEG | Lossy | Quality slider from 0 to 100. Does not support transparency — transparent areas are filled with the canvas background color. |
| WebP | Lossy / Lossless | Modern format with quality control and alpha channel support. Smaller file sizes than PNG at comparable quality. |
| AVIF | Lossy / Lossless | Next-generation format with excellent compression. Browser support is detected automatically — the button shows "(N/A)" when unsupported. |
| SVG | Vector | Vector objects are exported as native SVG elements (rect, ellipse, path, text, etc.). Raster layers are embedded as base64-encoded PNG images. Group layers become nested SVG groups. |
| PSD | Raster | Adobe Photoshop format. Each layer is exported with its name, opacity, visibility, and blend mode. Vector objects are rasterized. Compatible with Photoshop, Affinity Photo, and other PSD-compatible applications. |
AVIF offers significantly smaller file sizes than JPEG and WebP at equivalent visual quality, but not all browsers support it yet. Paint Forge probes for support on startup and disables the option gracefully when unavailable.
Export Options
The Export dialog provides several controls for fine-tuning the output.
- Quality slider (0-100) for lossy formats (JPEG, WebP, AVIF). Higher values produce larger files with less compression.
- Export scale: preset buttons for 0.5×, 1×, 2×, and 4×, plus a custom scale input accepting values from 0.1× to 10×.
- DPI metadata is displayed for reference (cosmetic only — does not affect pixel dimensions).
- Live file size preview updates in real time as you adjust format, quality, and scale.
- A warning is shown when the estimated file size or canvas dimension exceeds browser limits.
- Export is always rendered at 0° rotation regardless of the current view rotation.
Use the 2\u00d7 or 4\u00d7 scale option when you need high-resolution output for print or retina displays. The export is always rendered at 0\u00b0 rotation regardless of the current view rotation.
Export Presets
Save frequently used export configurations as named presets so you can apply them with a single click.
- Each preset stores the format, quality, and scale settings.
- Load a saved preset from the preset bar at the top of the Export dialog.
- Up to 5 custom export presets can be saved (stored in localStorage).
- Default export settings (format, quality, scale) can be configured in File → Preferences under Export Defaults.
Batch Export
Batch Export lets you export individual layers or objects as separate image files, packaged into a single ZIP download. Open it from File > Batch Export or the command palette.
- Choose to export layers, objects, or both as individual files.
- Naming templates support tokens: {name}, {type}, {#}, {##}, {###}, {layer} for flexible file naming.
- Output is packaged as a ZIP archive via JSZip and downloaded automatically.
- Two-phase progress indicator: first the individual items are exported, then the ZIP is compressed.
- Per-item error handling — if a single item fails, the rest continue and a warning lists the failed items.
Use the {##} token in your naming template to get zero-padded sequential numbers (01, 02, 03, ...), which keeps files sorted correctly in file managers.
Animated GIF Export
Export your layers as an animated GIF from File > Export as GIF or the command palette. Each selected layer becomes one animation frame.
- Select which layers to include and reorder them to define the frame sequence.
- Frame delay is configurable from 20 ms to 2000 ms per frame (also shown as FPS).
- Loop mode: infinite, play once, or a custom loop count.
- Scale presets: 0.5×, 1×, or 2×.
- Background color toggle — include the canvas background or export with transparency.
- Up to 100 frames maximum; maximum dimension 2048 px.
- Uses the gifenc library with 256-color quantization per frame.
- A progress indicator tracks the export; heavy GIFs yield to the UI between frames for responsiveness.
Clipboard Operations
Paint Forge supports a full set of copy, paste, and cut operations for objects, pixel data, styles, and adjustment configurations.
| Operation | Shortcut | Description |
|---|---|---|
| Copy | Ctrl+C | Copies selected objects as JSON to the internal clipboard. |
| Paste | Ctrl+V | Pastes copied objects with a cascading offset. The offset wraps back to zero after 200px. |
| Paste in Place | Ctrl+Shift+V | Pastes copied objects at their original position (no offset). |
| Paste as New Layer | Ctrl+Alt+Shift+V | Creates a new layer and pastes the copied objects onto it. |
| Cut | Ctrl+X | Copies the selected objects and then deletes them from the canvas. |
| Copy Merged | Ctrl+Shift+C | Composites all visible layers, crops to the active pixel selection bounds (with mask alpha), and copies the result as a PNG to the system clipboard. |
| Copy as SVG | — | Copies selected vector objects as SVG markup to the system clipboard. Available from the Edit menu, context menu, and command palette. |
| Copy Style | Ctrl+Alt+C | Copies the visual style of the selected object: fill, stroke, opacity, blend mode, and effects. |
| Paste Style | Ctrl+Alt+V | Applies a previously copied style to the currently selected objects. |
| Copy/Paste Adjustment | — | Transfers the full filter configuration between adjustment layers. Use the inline buttons in the adjustment layer config or the Image menu. |
| Copy Transform | Ctrl+Alt+T | Copies the transform properties of the selected object: position, size, rotation, scale, skew, and flip. |
| Paste Transform | — | Applies a previously copied transform to the current selection. Available from the Edit menu and command palette. |
Ctrl+Shift+C (Copy Merged) is especially useful for sharing a flattened preview of your work without modifying the layer structure. If no pixel selection is active, the full canvas is copied.
Import
Images can be added to the canvas by dragging files directly onto the editor or by using the Upload Image dialog (File > Upload Image).
- Drag-and-drop images directly onto the canvas. The drop position is converted to scene coordinates and the image is placed at that location.
- Upload Image dialog provides a file picker with drag-and-drop support and validation feedback.
- Supported image types include PNG, JPEG, WebP, SVG, GIF, BMP, and other standard formats.
- SVG files are sanitized via DOMPurify before insertion to prevent XSS and other security risks. Dangerous attributes like xlink:href, href, action, and formaction are stripped.
- File signature validation checks magic bytes at the start of each file to verify the actual file type matches the declared MIME type.
- File size limits are enforced to prevent browser memory issues with excessively large images.
When you drag an image onto the canvas, it is inserted as a new image object on the active layer. You can then use the non-destructive Image Crop tool (right-click the image > Crop Image) to frame it without losing the original pixel data.
Canvas Commands
Several canvas-level commands are available from the Image menu and the command palette:
- Export Active Layer — exports just the active layer as a standalone image file via the Export dialog (single-layer export mode).
- Duplicate Project — creates an independent copy of the current cloud project under a new name.
- Clear Canvas — clears all raster pixel data on the active layer without removing the layer itself.
- Apply Filters to Visible Layers (canvas:batchfilter) — destructively applies the current filter/adjustment settings to all visible non-adjustment, non-group layers in one operation. Requires confirmation.
Saving
Paint Forge uses a multi-layered saving strategy that combines local auto-save, cloud persistence, and session backups to protect your work.
- Local Auto-Save runs every 10 seconds (configurable in Preferences), writing the full project state to localStorage.
- Cloud Save runs every 30 seconds for signed-in users, persisting the project to Supabase (PostgreSQL + Storage).
- Snapshots are created automatically when a project is loaded from the cloud, before destructive operations, and manually via File → Snapshots. Up to 20 snapshots per project are stored in the database.
- Multi-Tab Sync: when one tab saves to localStorage, a BroadcastChannel message notifies other open tabs. A toast with a Reload button appears so you can pull in the latest changes.
- Manual Save: press Ctrl+S or use File → Save to trigger an immediate save (local + cloud if signed in).
- An asterisk (*) appears in the browser tab title when unsaved changes exist, so you can tell at a glance whether the project is dirty.
- The browser's beforeunload prompt fires when you try to close or navigate away from a tab with unsaved changes.
- If you close the editor with unsaved changes, Paint Forge detects the auto-save on next visit and offers to restore the unsaved project via the Restore Project dialog.
If you accidentally close the editor, the auto-save data is preserved in localStorage. On next visit, Paint Forge will offer to restore the unsaved project. For an extra safety net, use Ctrl+Alt+S to create a named history snapshot that you can return to at any time.