# My Atelier

Turn a photograph into framed, painterly artwork sized for art-mode televisions
and digital canvases.

My Atelier is **one self-contained HTML file**. There is no build step, no
installer, no account and no server. Download `my_atelier.html`, open it in
a browser, and drop in a picture.

## Running it

Open `my_atelier.html` in any modern browser. That's it.

Two notes:

- **Serving it over `http(s)://` is better than opening it from disk.** Browsers
  block `localStorage` on `file://` origins, so Saved Looks are session-only when
  you open the file directly. Served over HTTP they persist. Either way, **Export
  / Import JSON** is the reliable way to keep a look.
- **HEIC files** need Safari. In any other browser, convert them to JPEG first — on a Mac,
  right-click in Finder and choose Quick Actions → Convert Image.

## What it does

- Painterly rendering (Kuwahara-based), with stroke, depth and coarseness controls
- **Eleven art movements**, procedurally emulated — Impressionism through to Byzantine mosaic
- Palettes taken from a reference picture of your own, carried in a saved look
- Physical surface simulation — canvas, hot-press paper and others, with relief and bleed
- Procedurally drawn frames, mounts and bezels, from slim battens to carved mouldings
- Output at any size: 8K / 4K / 1080p, 21:9, 32:9, Apple display sizes, or custom
- A wall preview for scale, which never affects the exported file
- **Actual size** — inspect the picture at 1:1 on a monitor smaller than the export
- Batch processing to a zip

## Art movements

Alongside the Oil and Watercolour filters there are eleven **art movements**. These are
not filters over the photograph: each one reproduces the rules its painters actually
worked to, using an edge-tangent flow field for stroke direction, an OKLab palette
engine for the colour theory, region decomposition for the flat-plane movements, and
an extended difference-of-Gaussians for the printed keylines.

| Movement | What it does |
| --- | --- |
| **Impressionism** | Broken colour in short directional strokes; shadows cooled toward blue rather than blackened, lights warmed, no pure black anywhere |
| **Post-Impressionism** | Long ropes of pigment through a deliberately curled flow field, so passages spiral instead of lying flat. Heavy impasto |
| **Dense Post-Impressionism** | The same curled flow field worked in short loaded strokes laid touching rather than blended, so each mark keeps its own value and the surface reads as thousands of separate touches. Slower to render than most |
| **Pointillism** | Unmixed warm and cool dots on a light ground, left to mix in the eye |
| **Fauvism** | The whole picture rotated off its natural hue, flattened into saturated planes, drawn back together with a coloured outline |
| **Ukiyo-e woodblock** | Flat keyed colour from a small block palette inside a printed keyline, with a bokashi gradient wiped across the sky |
| **De Stijl** | Split wherever the picture still holds contrast, then each rectangle argued down to a primary, a grey or a white and ruled off in black |
| **De Stijl ghost** | The same rectangles with the photograph still showing through them in black and white — the subject legible under the grid instead of gone |
| **Screenprint** | Four flat inks, Ben-Day dots carrying the half tone, a keyline over the lot, plates a whisker out of register |
| **Colour field** | A few soft-edged rectangles floating on a stained ground, taking their colours from the bands of the photograph they stand in front of |
| **Byzantine mosaic** | Tesserae set in courses that follow the drawing, dark grout between, gold through the brightest passages |

**No AI and no network.** Every movement is ordinary procedural code running in your
browser. Nothing is downloaded, no model weights are bundled, and the app still makes
zero network requests.

### De Stijl ghost

Plain **De Stijl** destroys the subject by design — that is what the movement did. **De
Stijl ghost** stops at the half-way stage the abstraction was arrived at through: the
same grid and the same primaries, with the photograph multiplied back over the planes in
black and white, so the subject stays legible underneath.

Both variants share `mv.seed`, so at the same seed they produce the *same* rectangles —
you can flip between them to see what the abstraction was made from.

**Ghost strength** cycles four levels, from a faint shadow to a clearly readable picture.
The ghost is eased off over the red, blue and yellow rectangles: a flat multiply turns a
cadmium red into dark brick and the whole point of the colour is lost, so the primaries
take roughly half the weight the whites and greys do.

### Palette

Every movement works from a palette, and each ships with its own — drawn from the
pigments that movement actually had: Prussian blue and *beni* red for the woodblock,
the De Stijl primaries, cadmium and viridian for the Fauves. Impressionism and
both Post-Impressionisms have no fixed set and take their colour from your photograph
unless you give them one.

**You can replace it with colours taken from a picture of your own.** Under an art
movement, choose **From a reference…**, pick any image, and the app measures its
dominant colours and uses those instead. Set how many to take with the slider first,
from three to twelve.

**Only the palette is kept.** The reference is decoded, measured and dropped — it is
not stored, not written into the look, and never leaves your browser. A look carries a
handful of hex values, not anybody's picture.

Each movement fits those colours to its own structure rather than using them flat:
De Stijl takes its three accents from the most chromatic and its ground from the rest
by lightness; the screenprint assigns four ink slots — lightest as the ground, darkest
as the key, the most chromatic of the remainder carrying the half tone and accent;
Pointillism mixes its dots only from what is on the palette, and takes the ground it
lays them on from the lightest colour in it; a mosaic cuts every tessera from the same
stock. The two brush movements pull each stroke onto the nearest palette colour while
keeping most of the photograph's **lightness**, because that is what carries the
drawing — so a night palette sends the darks blue and the highlights gold on their own,
and the subject stays legible underneath.

Because the palette is part of the look, it exports and imports with everything else —
which is what makes a set of shareable looks possible.

### Intensity

The **Intensity** slider is a parameter ramp, not a cross-fade. At 30% you get a
picture with a little of the movement in it — not 30% of a finished one blended over
a photograph. **Reshuffle** redraws every random decision the movement makes: stroke
placement, the arbitrary hue Fauvism turns on, which dots take the complement.

### Why a movement takes seconds to export

Marks are placed in normalised coordinates and sized as a fraction of the short side,
so the stroke count does not depend on the raster. That is deliberate: it is what makes
the preview and the 4K export **the same painting** at two resolutions rather than two
different ones. The cost is that a preview is as much work as an export, so the canvas
shows a fast approximation while the real painting is built in the background, and a
4K export takes a few seconds — roughly 3 to 12 depending on the movement — with a
progress bar and a Stop button.

A consequence worth knowing: the fine-marked movements — Pointillism, Byzantine mosaic
— look like noise in a small thumbnail and only resolve at full size. That is what
those movements do; it is not a rendering fault.

## The crop overlay

**Crop overlay** in the top bar dims the parts of your photograph that fall outside
the output and draws two guides over what is left:

- **Blue, solid** — the output rectangle. Whatever your target size is set to, this
  is what gets exported. Anything beyond it is cropped away.
- **Orange, dashed** — what the frame's opening leaves you. The moulding, shadow gap
  and mount all cut inward, so this is the part of the picture that actually survives
  into the finished piece. Keep faces, horizons and anything else that matters inside
  it, not merely inside the blue.
- **Thin white grid** — rule of thirds.

The orange guide is not drawn when there is no frame and no mount, because nothing is
cropping the opening. It is usually just two horizontal lines rather than a full
rectangle: frame and mount widths are percentages of the **short** side, so they take
proportionally more from the height than the width, and the left and right edges end
up sitting on the blue ones.

The hint beneath the Crop overlay switch reports the cost of your current framing live
— for example that a Museum oil frame at 4K hides 13% of the height, rising to 17% on
a 21:9 output.

## Actual size

Your monitor is almost certainly smaller than your export. A 3840 × 2160 file on a
1000-pixel-wide stage is being shown at about a quarter scale — and the things most worth
judging are exactly the ones a reduction destroys: a single brush stroke, the grain of
the support, a Pointillist dot, a mosaic tessera and its grout.

**Actual size** in the top bar renders the picture at its true output size and gives you
a 1:1 window onto it. Drag to pan, and press Escape or click the button again to leave.
The bar along the bottom of the canvas reports what you are looking at and how much of
the whole it represents — typically under 10% at 4K — with a small map showing where in
the frame you are.

### Zoom

The bar carries **−**, a percentage, **+** and **Fit**. Zoom costs nothing: the picture
is already rendered at full size, so changing the level is a redraw, not a re-render.

| | |
| --- | --- |
| Scroll wheel | Zoom about the cursor |
| Shift + scroll, or a sideways swipe | Pan |
| `+` / `-` | Zoom in / out |
| `1` | Back to 1:1 |
| `0` | Fit the whole picture |
| Click the percentage | Back to 1:1 |

Levels run 12.5% to 800% on a **ladder** rather than continuously, and above 1:1 every
step is a whole-number multiple. That is deliberate: at 170% a nearest-neighbour
magnification lands some output pixels two screen pixels wide and their neighbours
three, which invents texture that is not in the file — the one thing an inspection view
must never do. For the same reason magnification is unsmoothed, so you see the output
pixels themselves, while reduction *is* smoothed, so a zoomed-out view does not alias
detail into existence.

It renders through **the same path as the export**, so what you are inspecting is
literally what the file will contain, not an approximation of it. That has two
consequences worth knowing:

- Entering costs one export's worth of time — a few seconds for an art movement, with a
  progress bar and a Stop button.
- Changing a setting does **not** silently re-render. The bar marks itself out of date
  and offers to redo it when you click; at seconds a go, when to pay that is your call.
  A re-render keeps the spot you were looking at, so you can compare the same patch
  across a settings change.

On a high-DPI display it uses the real device pixels, so 1:1 means 1:1 there too.

## Privacy and your data

**Your images never leave your computer.** All processing happens in the browser
using the Canvas API. The app makes **zero network requests** — no fonts, no CDN,
no analytics, no telemetry, no error reporting. You can verify this yourself: open
the developer console and run

```
performance.getEntriesByType('resource').length
```

It should return `0`. This is a deliberate design invariant, not an accident, and
it is checked as a regression.

Because nothing is uploaded, no copy of your photographs is ever stored, seen or
transmitted by anyone.

## Rights in the images you process

My Atelier is a general-purpose image tool. **You are responsible for holding
the necessary rights in any image you load into it.**

Applying an artistic treatment to someone else's photograph does not, on its own,
create a new work you are free to use. That is the position in nearly every country —
copyright is internationally harmonised through the Berne Convention — and the
exceptions people reach for are narrower than they tend to assume.

**United Kingdom.** No general "fair use" doctrine, and no private copying exception:
the one that briefly existed (s.28B CDPA 1988) was quashed in 2015 and never replaced.
Fair dealing covers a short closed list — quotation, parody, review — and "I liked this
photograph so I stylised it" is not on it.

**United States.** Fair use exists, but was read narrowly for this exact fact pattern in
*Andy Warhol Foundation v Goldsmith* (2023), where an artistic reworking of another
photographer's image was held not to be fair use when put to substantially the same
purpose as the original. "But I transformed it" is a weaker argument after Warhol than
before it.

**Elsewhere.** Most jurisdictions sit closer to the UK than the US. Open-ended fair use
is comparatively rare; the majority use closed lists of permitted exceptions, so the
practical answer is usually the same: get permission.

In practice: your own photographs are yours to do anything with. For anyone
else's, get permission before you publish the result.

## What metadata an export carries

The browser's `canvas.toBlob()` cannot write metadata at all, so My Atelier adds
it back afterwards: a small XMP packet is injected into the encoded file — an APP1
segment for JPEG, an `iTXt` chunk for PNG.

**Rights fields only, and only what you can see.** The Export panel has three
fields — Creator, Copyright and Usage terms. Whatever is in them is written into
every export as `dc:creator`, `dc:rights`, `photoshop:Credit` and
`xmpRights:UsageTerms`, alongside the artwork name as `dc:title`. Leave them blank
and nothing whatsoever is embedded.

When you load a photograph, those fields are prefilled from the source file's own
Artist and Copyright tags (or its XMP, if it has any), so your authorship follows
your work through without you having to think about it. Once you type in a field,
your wording stands and later images will not overwrite it.

**What is deliberately dropped:** GPS coordinates, camera serial numbers, owner
name, and all exposure and lens data. Publishing where a photograph was taken is a
real risk that has hurt real people, and the exposure data would be a lie anyway —
the export is a restyled, cropped, matted composite, not the frame the camera shot.

If you want fuller metadata than this, add it afterwards with a tool such as
`exiftool`.

## Trademarks

My Atelier is **not affiliated with, endorsed by, or sponsored by any hardware
manufacturer**.

Display and product names appear in this software only to identify the hardware a
given setting is meant to suit — chiefly the resolution presets. They are used
descriptively; no connection to any of these companies is claimed or implied.

- "iMac", "MacBook Air", "MacBook Pro", "Studio Display" and "Pro Display XDR" are
  trademarks of Apple Inc.
- Any other product or display name is the trademark of its respective owner.

The name is ordinary English for an artist’s workshop, which is what the app is.

The **art movement names** — Impressionism, Fauvism, De Stijl, Ukiyo-e and the rest —
are historical descriptions of styles, not marks, and no artist, estate or foundation is
connected with, or has endorsed, this software. The movements are emulations built from
published descriptions of technique; no artwork is reproduced, copied or incorporated,
and no model was trained on anyone’s paintings.

## Licence

Licensed under the **Apache License, Version 2.0**. See [LICENSE](LICENSE) and
[NOTICE](NOTICE).

The licence includes an express disclaimer of warranty and a limitation of
liability. The software is provided "AS IS". Keep your originals — it is an art
tool, not an archival one.

## A note on how it was built

Parts of this software were written with the assistance of an AI coding tool.
This is disclosed for transparency: in some jurisdictions the copyright status of
AI-generated material differs from hand-written work, and anyone reusing this code
should be aware of that. The Apache 2.0 grant above is offered in good faith over
whatever rights do subsist.

## Contact

Issues and questions: <https://github.com/JunoFirst/my-atelier/issues>

If you believe this project infringes your rights — copyright, trademark, or a
photograph of your own — please open an issue there before escalating. Most
things are fixable in an afternoon.
