![]() ![]() load(json_file) #load each json file data Return(exif_dict) #return the exif dictionary to main input = input( 'Please enter the path of the Google Photo Takeout directory:') Minutes,seconds = divmod(degrees *3600, 60)ĭegrees = degrees if is_positive else -degreesĭegrees2 = Fraction(degrees). Import piexif from datetime import datetime # -*- coding: utf-8 -*- """ Created on Thu Jul 30 16:52:15 2020 """ import json import os import glob import re from fractions import Fraction Return(exif_dict) #return the exif dictionary to mainĪs we can see, it was quite easy to implement a Python script that extracts the JSON data from Google Photos and updates the EXIF data for each JPG. Original_datetime = '0:0:0 0:0:0' #no EXIF information in the JPGĮxif_dict = photo_date #write the json data to the EXIF dictionary print( 'json_file:', json_data, 'picture:', filename, 'date stored in exif was:', original_datetime, 'and is changed to:', photo_date)Įxif_dict = geo_degrees_conv(json_data) #write the latitude information from the JSON to the EXIF dictionaryĮxif_dict = geo_degrees_conv(json_data) #write the longitude information from the JSON to the EXIF dictionary print( 'json_file:', json_data, 'picture:', filename, 'latitude set to:',exif_dict, Original_datetime = exif_dict #if the JPG had a value, get it except: That's why I changed such data after the upload to Google Photos.ĭef modify_exif(exif_dict, filename, json_data): #input1: exif dictionary, input2: the filename, input3: the json data #datatime taken I uploaded a lot of old photos that I had scanned/digitalized and obviously, they had no metadata. Namely, the date/time when the photos was taken and the geo location (GPS data). The main features I wanted to use target the metadata that can be changed in Google Photos. It is of course possible to modify my Python script to iterate through each folder, but for me, it was sufficient for me to apply the script to one folder at a time. ![]() ![]() You will already notice that several folders are created and that each image/video file has its own JSON file that is named exactly as the image/video file. Next, you have to unpack the ZIP file/files to a folder on your PC. After starting the export, it takes some time (in my case some hours) until you get a notification Email and can start the download process. My Google Photos were about 600 Gigabyte in size, therefore make sure you have some local storage that you can use to download everything. In the next step, you can select the file type (I recommend ZIP) and the size when the ZIP file is being splitted. Next you only select Google Photos as the service that you want to export and select one or several albums. First step: use the Google Takeout serviceįirst, you have to navigate to the Google Takeout page. This post will describe how to export all pictures and show how to use a small and fast Python script to add the metadata from each JSON file to each respective photo. However, the metadata that has changed since the initial upload is stored in a JSON file that you have to access through the Google export service (Google Takeout). Because I'm an Amazon Prime user, I have also unlimited photo storage space on Amazon photos - that's why I wanted to download all photos with all metadata and upload them to Amazon Photos. ![]() It is better to backup data and store it on your physical devices (NAS or hard drives) or upload it to another cloud provider. What happens if you lose your password or you get hacked? What if Google has a major data breach and all photos are deleted (highly unlikely)? What if you accidentally delete photos? If you add additional information (such as geo location data) or change the date/time a photo was created (because you digitalized old photos and want them to show up at the right point in time) such information are stored in Google Photos but are not changed in the EXIF data of the photos.Įven though, I love Google Photos and use it as my main photo storage service, it is not smart to solely rely on such a service. However, one thing is a major disadvantage. It is just great! Unlimited storage for all my photos (in a really high resolution), they are automatically grouped using machine learning, and I can put them in albums and share them easily. ![]()
0 Comments
Leave a Reply. |