-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert edited RAW files without _edited suffix #1508
Comments
Since But note that often when editing a RAW in Photos, the JPEG is not edited. The edits are stored in a .AAE file in the library as non-destructive edits and the JPEG that OSXPhotos exports will be the original, not the edited version. This will be fixed a future version when I can convert OSXPhotos to using native (but undocumented) API calls instead hacking the Photos library, which it does now. But that day is probably not until next year. |
I see, thank you! |
After thinking about it some more, I actually prefer the way OSXPhotos converts the images because it uses the same engine as Apple Photos (I think?)
|
For conversion, OSXPhotos uses the native Apple API so it should match what Photos does. It's important to note OSXPhotos exports only the cached edited version if there is one. This is a smaller file than you'd get with the "Export" command in Photos which renders a JPEG or other format at the time of the export that incorporates edits. That means that currently some edited photos won't have an edited image when exported with OSXPhotos and you'll only get the original. This mostly affects RAW images. I plan to fix this in a future release that will use native code to apply the edits and export the converted image (and maybe let you specify file format). This will be a big change and take some time to implement. The workflow you outlined should be possible but will take a bit of thought to figure out the best way to do this without over complicating the export options and logic. One thought I've had is a plug-in system that would allow you to install custom "handlers" for certain files. Eg if RAW, hand off to the plug-in to do the export. For the metadata, you could do something like This adds the |
I've played around with various permutations of the edited images and how they show up as stacks in PhotoPrism. The below stacks all these images together as it should, even though there's a HEIC, a .MOV (live photo) and an .edited in the end of the edited filename: However, the following was not detected stacked as you'd expect. The right is RAW+JPEG, the left is the .edited.jpeg: It seems that the original .NEF doesn't have an XMP created for it, so it originally thought the date taken was 2017 instead of the correct-in-apple-photos of 1980. I then ran the export again with both --sidecar and --exiftool and the .NEF now had the corrected date. But that still didn't help stack them together. I then checked how PhotoPrism uses exif data to stack together and came up with this:
I wonder if osxphotos use the same instance ID for all permutations of the same image? |
OSXPhotos does not write an instance ID. If you can tell me exactly what tag this is or send the output of |
It seems like the correct parameter to use is in XMP files and it's called I guess this should be set to the value of Here's a sample XMP that was generated with ChatGPT so take it with a grain of salt :)
|
I tried to add the fields manually to two .XMP files (1 below as an example) but it doesn't seem to impact stacking. I'll followup at the photoprism discussion threads.
|
Found it.
Edit: It appears that
|
I'll open a new issue to add this. OSXPhotos writes the same data with exiftool and to the XMP for simplicity. One thing to keep in mind is that if assets are exported to multiple folders (for example, same photo in multiple albums) then they'd all have the same document ID. |
Thank you! |
--convert-to-jpeg does a full render with default quality 1.0 (best) but this can be adjusted with --jpeg-quality |
@odedia I opened #1510 to track the addition of
This uses the Edit to add more description for the If you really wanted to do the same for the XMP file, you could use |
Great idea! |
And if you wanted to apply this to an existing export, you could use |
@all-contributors please add @odedia for ideas, research |
I've put up a pull request to add @odedia! 🎉 |
When you edit JPEGs, it makes sense to want to preserve the original jpeg and an edited version.
However, when dealing with RAW files, usually you just want a RAW+JPEG combo.
Currently, all edited JPEGs contain a suffix like
_edited
to indicate they are edited versions of the original.It would be great to have a property like
--ignore-edited-suffix-for-raw
so that if a RAW file was edited in Apple Photos, the result should be just the RAW file and its edited JPEG without suffix, for example:This should also make it easier for apps like PhotoPrism to stack them correctly.
Thanks
The text was updated successfully, but these errors were encountered: