The XMP edit stack
Photo2Mac is non-destructive: every adjustment lives on an
EditStack rendered live by Core Image. When a save
writes pixels, Photo2Mac also embeds the EditStack as XMP metadata
inside the image, with a marker saying how the file was written. The
marker decides how it is read back: in the mode that keeps the
original inside, the stack is editable again; in the plain
«save what you see» mode it is a record of what was done,
never applied twice. Other apps see the pixels.
This is the on-disk format, so external tools can read or even
produce one.
Namespace
- URI:
http://ns.photo2mac.cremenescu.ro/1.0/
- Prefix:
p2m
- Properties:
p2m:editStack (a UTF-8 JSON string), p2m:saveMode, and with an embedded original p2m:originalImage, p2m:originalType, p2m:originalSHA256
The same property is written into JPEG (APP1), PNG (iTXt
XML:com.adobe.xmp), HEIC (meta box) and TIFF (tag 700)
via Apple's ImageIO.
EditStack JSON
{
"rotateDegrees": 0, // clockwise, supports 0.01° increments
"flipHorizontal": false,
"flipVertical": false,
"crop": { ... }, // optional: { x, y, width, height } normalized 0..1
"cropBasisDegrees": 0, // rotation the crop was drawn under
"adjustments": {
"brightness": 0.0, // -1 .. 1 -> CI -0.5 .. 0.5
"contrast": 0.0, // -1 .. 1 -> CI 0.5 .. 1.5
"saturation": 0.0, // -1 .. 1 -> CI 0.0 .. 2.0
"exposure": 0.0 // -3 .. 3 EV stops (CIExposureAdjust)
},
"resize": { ... } // optional: { width, height, keepsAspect }
}
Render order is fixed and applied in this sequence:
flipH → flipV → rotate → crop → adjustments → resize —
geometry first (so crop always operates on the rotated
frame the user actually sees), then pixel adjustments, and resize
last so the result is resampled once.
Also written: standard tags
So that any XMP viewer — Preview's Inspector, Metapho,
Adobe Bridge, exiftool, mdls, macOS Get Info
— can see what happened to the file, two well-known tags are
written alongside p2m:editStack:
xmp:CreatorTool — e.g. Photo2Mac 0.3.0
dc:description — one-line English summary of the stack
These values are always English regardless of
Photo2Mac's UI language — file metadata is read by tools and
people anywhere, so it stays locale-independent.
Example: rotate + crop
A 2.5° counter-clockwise straighten, then crop to the central
90%×80%:
{
"rotateDegrees": -2.5,
"flipHorizontal": false,
"flipVertical": false,
"crop": { "x": 0.05, "y": 0.10, "width": 0.90, "height": 0.80 },
"cropBasisDegrees": -2.5,
"adjustments": {
"brightness": 0, "contrast": 0, "saturation": 0, "exposure": 0
}
}
The matching dc:description:
Photo2Mac 0.3.0 — rotate -2.50°, crop 90%×80% at (5%, 10%)
Inspecting a Photo2Mac file from the command line
With exiftool:
# Every XMP field, including the p2m one
exiftool -XMP:all -G photo.jpg
# Just the edit stack JSON
exiftool -XMP-p2m:editStack -b photo.jpg | jq
# Human-readable summary
exiftool -XMP-dc:Description -CreatorTool photo.jpg
Full reference, including the stability policy (the 1.0/
in the namespace URI is the schema version): docs/XMP.md in the repo.
Frequently asked questions
Is Photo2Mac free?
Yes. Photo2Mac is free and open source under the
GPL-2.0-or-later license. There is no paid tier, no subscription, no telemetry: the only network request is a daily update check against cremenescu.ro, which sends nothing about you or your Mac and can be switched off in Settings. The source and the .dmg download are both on GitHub.
What does «non-destructive» actually mean here?
The original pixels of your file are never touched until you press Save. Every adjustment — crop, rotate, flip, brightness, contrast, saturation, exposure, resize — lives on an EditStack that is rendered live by Core Image. What Save does is your choice in Settings: the file becomes the edited image, the original stays untouched with the edits in a .p2m file beside it, or the edited file carries the original inside. In the last two modes, re-opening the file in Photo2Mac gives you the edits back to keep changing.
Which formats does Photo2Mac read and write?
It opens JPEG, PNG, HEIC, TIFF, WebP and AVIF, and saves or exports JPEG, PNG, HEIC and TIFF. RAW support is on the roadmap. XMP metadata is embedded in all four output formats via ImageIO.
Does it work on Apple Silicon Macs?
Yes. The .dmg is a universal build for Apple Silicon and Intel Macs and requires macOS 14 Sonoma or later.
Do I need to clear a Gatekeeper warning before opening it?
No, since v0.3.0. The .dmg is signed with a Developer ID and notarized by Apple, so it opens normally. Versions up to v0.2.1 were ad-hoc signed and needed this once:
xattr -dr com.apple.quarantine /Applications/Photo2Mac.app
Does Photo2Mac need Homebrew or any other dependency installed?
No. The .dmg is self-contained (about 2 MB) and links only to Apple system frameworks (Core Image, ImageIO, AppKit, SwiftUI). Drag to Applications and run.