state prop.
What Save Gives Back
onProcess receives two things:
Without
onProcess, Save downloads the file.
Store It
The state is plain JSON. Keep it next to the original photo.Reopen It
Pass the original photo assrc and the stored state as state. The photo reopens exactly as it was saved.
src and state are read when the editor opens. To load another photo, give EmbedEditor a new key, or destroy and mount again.What to Know
- Never an image. The state holds no pixels. Watermarks and signatures come back from your props.
- Every field is written, defaults included. A state you write by hand may leave any field out; a missing field reads as its default.
- Screen units. Adjustments run −100 to 100, rotation is in degrees, geometry is in px of the size the editor works the photo at.
versionis3. A wrong version, a value out of range or more than 64 areas is anINVALID_STATEerror. The editor never opens a state half-applied.processImageresolves to a state too, ready for thestateprop.
State Reference
Every field of
EditState.Migrating from Pintura
Open states saved by Pintura.