# Publish – Export & Sharing

The Publish module enables exporting your artworks to various formats and sharing them with the world.

## Export Formats

| Format | Usage |
|--------|-------|
| **SVG** | Pen plotter, print |
| **PNG/JPEG** | Social media, web |
| **Video** | Animations, loops |
| **GIF** | Short animations |
| **Web Bundle** | Standalone website |

## SVG Export

For pen plotters and high-resolution print:

```typescript
import { SVGExporter } from '@carstennichte/cc-toolbox';

const exporter = new SVGExporter({
  width: 297,      // mm (A4)
  height: 210,
  unit: 'mm',
  precision: 3
});

exporter.export(artwork, 'output.svg');

Plotter Optimization

exporter.optimize({
  sortPaths: true,        // Minimizes travel distance
  mergePaths: true,       // Connects contiguous paths
  removeDuplicates: true  // Removes duplicate lines
});

Video Export

For animations:

import { VideoExporter } from '@carstennichte/cc-toolbox';

const exporter = new VideoExporter({
  fps: 60,
  duration: 10,        // Seconds
  codec: 'h264',
  quality: 'high'
});

await exporter.export(artwork, 'output.mp4');

Options

Option Values
fps 24, 30, 60
codec h264, webm, prores
quality low, medium, high, lossless

Snapshots

Save the current state:

// In the artwork
artwork.saveSnapshot('morning-light');

// Load later
artwork.loadSnapshot('morning-light');

Snapshot Management

item-001/Snapshots/
├── morning-light.json    # Parameters
├── morning-light.png     # Preview
├── evening-mood.json
└── evening-mood.png

Web Bundle

Export an artwork as a standalone website:

npm run export:web -- item-001 --output ./web-bundle/

Result:

web-bundle/
├── index.html
├── artwork.js
├── artwork.css
└── assets/

Hosting Options

Service Command
Netlify netlify deploy
Vercel vercel
GitHub Pages Push to gh-pages branch

Social Media

Optimal Formats

Platform Format Size
Instagram 1:1 1080×1080
Instagram Stories 9:16 1080×1920
Twitter/X 16:9 1200×675
Threads 4:5 1080×1350

Batch Export

npm run export:social -- item-001 --platforms instagram,twitter

Sharing

Via Collab Server

  1. Publish to Collab Server
  2. Share the link: https://quiet-frames.de/gallery/entities

QR Code

npm run generate:qr -- item-001

Generates a QR code that leads to the artwork.

NFT Preparation

For NFT minting:

npm run export:nft -- item-001

Creates:

  • Artwork file (MP4/PNG)
  • Metadata JSON
  • Hash/signature

Print-on-Demand

Export for print services:

npm run export:print -- item-001 --dpi 300 --format tiff

Paper Sizes

Format mm px @300dpi
A4 210×297 2480×3508
A3 297×420 3508×4961
A2 420×594 4961×7016