> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embededitor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from Pintura

> Open the edit states you saved with Pintura: what carries over, what is dropped, and what the next Save writes.

Pass a state saved by Pintura to the `state` prop as it is, and the photo opens with its geometry.

## Open a Pintura State

```tsx React theme={"dark"}
import { EmbedEditor } from '@embededitor/full/react';
import type { PinturaState } from '@embededitor/full/react';

const PhotoEditor = ({ src, saved }: { src: string; saved: PinturaState }) => (
  <div style={{ height: 600 }}>
    <EmbedEditor src={src} state={saved} />
  </div>
);

export default PhotoEditor;
```

```js JavaScript theme={"dark"}
import { mountEditor } from '@embededitor/full/standalone';

mountEditor(document.getElementById('editor'), {
  src: '/photos/sunset.jpg',
  state: savedPinturaState
});
```

No conversion step is needed. A state without a `version` field is read as a Pintura state.

## What Is Kept

The parts that map one to one onto Embed Editor open as they were.

| Pintura | Embed Editor |
| - | - |
| `crop`, `rotation` (radians), `flipX`, `flipY` | The crop, its turn in degrees, and the flips. The crop is read in the photo's own px. |
| `cropAspectRatio` | The crop's ratio. |
| `redaction` | Obfuscate areas, pixelated as Pintura drew them, in the photo's own px. Each one's `rotation` (radians, clockwise) becomes its `angle` (degrees, same sense). |
| `targetSize` | The output size, in output px, never past 16.7 MP. |

On a photo over 16.7 MP, the crop and areas land on the same region of the editor's working copy. See [Large photos](https://docs.embededitor.com/features/large-photos.md).

## What Is Dropped

| Pintura | Why |
| - | - |
| `colorMatrix` (filter and adjustments), `convolutionMatrix`, `vignette`, `gamma`, `frame` | The two editors share none of these. |
| `annotation`, `decoration`, `backgroundColor`, crop limits, video fields | Not read. |

> [!WARNING]
>
> A photo saved with a Pintura filter, adjustments or frame opens without them. The person sees the crop and redactions, and can reapply the look with the editor's own tools.

More than 64 redactions is an `INVALID_STATE` error, as for any saved state.

## After the First Save

The next Save writes the photo's state as an `EditState` with `version` 3. Store it in place of the Pintura state. From then on the photo reopens with every edit. See [Saved state](https://docs.embededitor.com/saving/saved-state.md).

## Output Quality

`outputQuality` runs from 0 to 100, default 90. Multiply a Pintura quality of 0 to 1 by 100.

> [card] [Saved State](https://docs.embededitor.com/saving/saved-state.md)
>
> Store and reopen edits.

> [card] [State Reference](https://docs.embededitor.com/api-reference/state.md)
>
> Every field of `EditState`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.