Skip to content
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

The requirement for adding people tag information from JSON files to the exif of photos #273

Open
a8500830 opened this issue Jan 3, 2024 · 3 comments
Labels
exif Related to exif - or lack fo them in gpth.dart

Comments

@a8500830
Copy link

a8500830 commented Jan 3, 2024

Because Google Photos has excellent character recognition capabilities, it happens that this information is retained in the JSON file. Can we also import this information into the photo's exif. I am using a replacement for Google Photos, but its character recognition is far inferior to Google Albums. I have searched for many tools but there is no convenient or mature method. Can the author implement this feature? Thank you again for your tools!

@TheLastGimbus
Copy link
Owner

If we had exif inserting support i would think about this... but we don't right now :/

But i'll keep this issue - please add some examples of those jsons because mine didn't contain any of this

@TheLastGimbus TheLastGimbus added the exif Related to exif - or lack fo them in gpth.dart label Jan 10, 2024
@bigethan
Copy link

bigethan commented Mar 1, 2024

the people are listed in the JSON like:

  "people": [{
    "name": "Person Name"
  }, {
    "name": "Other Name"
  }],

@JerriAtric
Copy link

Adding the "People" part is the main reason I want to integrate the JSON from Takeout. Would LOVE to have this supported with GPTH.

The place to add this info is the XMP. The tag is:
Iptc4xmpExt:PersonInImage

I know that ExifTool can add this info to the XMP metadata in the image.

JSON from Takeout with the people info

{
"title": "20240502_194731.jpg",
"description": "",
"imageViews": "2",
"creationTime": {
"timestamp": "1714702933",
"formatted": "May 3, 2024, 2:22:13 AM UTC"
},
"photoTakenTime": {
"timestamp": "1714697251",
"formatted": "May 3, 2024, 12:47:31 AM UTC"
},
"geoData": {
"latitude": 00.0676694,
"longitude": -10.6657113,
"altitude": 186.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
"geoDataExif": {
"latitude": 00.0676694,
"longitude": -10.6657113,
"altitude": 186.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
"people": [{
"name": "Marny LastName"
}, {
"name": "AJ LastName"
}],
"url": "https://photos.google.com/photo/xxx",
"googlePhotosOrigin": {
"mobileUpload": {
"deviceFolder": {
"localFolderName": ""
},
"deviceType": "ANDROID_PHONE"
}
}
}

XMP sidecar

This shows the tag and the syntax when using an external XMP file. It can also be embedded into the image, which is what you'd want for this solution.

<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.58'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>
Iptc4xmpCore:Location100 Main St, Anytown, IA 52080, USA</Iptc4xmpCore:Location>
</rdf:Description>

<rdf:Description rdf:about=''
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
Iptc4xmpExt:PersonInImage
rdf:Bag
rdf:liAJ LastName</rdf:li>
rdf:liMarny LastName</rdf:li>
</rdf:Bag>
</Iptc4xmpExt:PersonInImage>
</rdf:Description>

<rdf:Description rdf:about=''
xmlns:crs='http://ns.adobe.com/camera-raw-settings/1.0/'>
crs:Version1.0</crs:Version>
</rdf:Description>

<rdf:Description rdf:about=''
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
xmp:CreateDate2024-05-02T14:47:31</xmp:CreateDate>
</rdf:Description>

<rdf:Description rdf:about=''
xmlns:xmpDM='http://ns.adobe.com/xmp/1.0/DynamicMedia/'>
xmpDM:albumDesktop > 24.05 Takeout metadata test,Mac uploads</xmpDM:album>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exif Related to exif - or lack fo them in gpth.dart
Projects
None yet
Development

No branches or pull requests

4 participants