Equivalent of "maximum" quality export in Photos #1522
Replies: 2 comments 17 replies
-
Interesting analysis -- thanks for sharing. Currently osxphotos exports only the cached edited image stored in the library (unless the image is missing and you use It would definitely be useful to have a way to export the "Maximum" quality image as you noted. I have some code where I've been playing with the private Photos API (which I hope to eventually turn into a complete rewrite of osxphotos). I'll take a look and see if there are any clues to doing this. |
Beta Was this translation helpful? Give feedback.
-
Hi Rhet, dusting off the project that had led to this thread earlier this year — everything's still working in Sequoia which is great. Just wanted to offer one more data point... I was curious if Jpeg XL support might open up an improved export pipeline in Photos.app on Sequoia, but FWIW I'm still seeing alpha channel deletion when exporting Jpeg XL images with transparency to PNG/ TIFF from the export menu. I'm not seeing any promising changes in the PhotoKit API diffs... any new insights from your end? |
Beta Was this translation helpful? Give feedback.
-
It seems like Photos.app implements some additional plumbing to re-render the stack of image adjustments at a higher quality when TIFF, PNG, or "Maximum" quality JPEG is requested via the export command GUI:
However, as far as I can find, all the available programmatic export techniques seem to top out at the equivalent of the "High" quality Photos.app JPEG export, sometimes resulting in non-trivial compression artifacts in the resulting images.
Seems like there's no way to specify export format or quality via AppleScript, and I tried writing a quick Swift app using PhotoKit directly to poke around and see if there were any options to request additional quality. I found none.
Interestingly PowerPhotos exposes additional export options (TIFF, "Maximum" quality JPEGs, etc.), but these don't seem to yield the same output as the equivalent options Photos.app. For example, a TIFF export comes with JPEG artifacts reminiscent of the "High" quality export from Photos.app.
I tested across a couple different export techniques for an image edited in Photos.app which was originally a 6MB jpeg out of the camera. The results are summarized below, with many landing at 497,748 bytes, suggesting the export is a straight copy from the edited JPEG stored in the Photos library filesystem:
I realize the relationship between file size and image quality is not guaranteed, but on inspection there are subtle but perceptible differences between the ~500K and ~5MB JPEG exports.
This is in no way the fault of osxphotos, and of course exporting the original image will preserve full quality regardless — but I'm curious if anyone else has noticed this discrepancy between "High" and "Maximum" quality exports of edited images, and if there's any sort of work around or option that can automate exports of a quality equivalent to that available in the (tragically cumbersome) Photos.app GUI.
Beta Was this translation helpful? Give feedback.
All reactions