Recipes
Each recipe solves one real task end to end. Every recipe has its inputs (downloadable fixtures), executable Swift (the code is run by Hokusai and the images are its output, checked in CI), the results, and variations with their own results. For one-liners see Quick examples.
| Recipe | You get |
|---|---|
| Social card | A 1200 × 630 link preview with a title, from any photo |
| Gallery thumbnails | Several sizes from one source, produced concurrently |
| Watermark | A prepared logo applied to many images, plus a faint proof tile |
| Circular avatar | A square crop masked to a circle, with a flat fallback |
| Contact sheet | A grid of tiles composed onto one canvas |
| PDF report | A vector PDF with real text and Hokusai-prepared images |
| Upload normalisation | Untrusted upload to a bounded, upright, metadata-free WebP |
All recipes run on the fixtures in examples/fixtures: scene.png (a 1600 × 1000 landscape), phone.jpg (the same scene stored sideways with EXIF orientation), emblem.png (a 400 × 400 logo with transparency). They are generated by code in the repository and are MIT-licensed. To reproduce every result: cd examples && swift run DocsExamples run.