Skip to content

Instantly share code, notes, and snippets.

@nealalan nealalan/photos.md
Last active Sep 9, 2019

Embed
What would you like to do?
Processing photos

By: Neal Dreher 2019-07-02

Processing Photos: Phone -> Library

Each time I pull photos from my phone (or camera memory card), I go through a process to pull, transform and store photos, followed by sorting, deleting and importing photos into old Google Picasa 3.9. The last version was released in Oct 2015. With 81,000 photos in Picasa, I fear the day I can no longer find a machine that I can run Picasa on.

Slowly I have been thinking about how I will sort my pictures and store them online. I don't really desire to store all in Google Photos, but it maybe the best free option. Right now, Google Photos doesn't have the options built out that Picasa does.

For example:

  • Selecting an area and tagging a face manually is possible in Picasa, not in photos.
  • Editing a location on a map is only possible in Picasa. You can use exiftool, to manually add GPS coords.
  • Sorting into collapsible folders. Right now, Google Photos puts EVERYTHING into a huge Photos view. This makes scrolling through more than a few 1000 photos a nightmare.

Google Photos is improving lately! I see some face recognition works. Also, some meta data tags are being applied to photos auto-magically. If you type "truck" in google photos, it does a good job at finding trucks and truck-ish items in photos.

This is my basic process.

  1. Use Image Capture built into MBP to access and import photos on device.

    • Select all photos and import them to ~/Google Drive/SCANS FOLDER/IMPORTED PHOTOS/
    • Once all files are completely backed up to Google Drive, I will remove them from the device using Image Capture. I do not delete before a backup copy is made, just in case something like a system crash would happen!
  2. Remove the DUPLICATES

    • I always have a number of files with an E extension. These are from modifying photos on my iPhone, which keeps the original and saves a copy of the edited photo.
    • Almost exclusively, I keep the edited file.
    • The process of removing the dupliactes is pretty manual since I need to see both the parent and child file.
    • Word to the wise: Do this before you do any renames just to make it easier!!!! If you sort the files by dates created, all the images that have been edited will have an associated .aae file next to them original. I usually always delete both the original .jpg and .aae since the edited images is the one i want to keep.
  3. Copy exif_rename_basic.sh into the folder, if it's not already there.

    • The current copy (2019-07-23) is located in github://nealalan/scripts
    • This process will use exiftool to try to rename all files (in a specific order) to YYYYMMDD_HHMMSS-original_name-640x480.EXT
    • To install exiftool from the command like on a Mac, you need Homebrew installed: brew install homebrew
  4. Copy all of the PNG files - since most are Screenshots to a seperate folder to sort through them

    $ mkdir PNG
    $ mv *PNG PNG/
  5. Convert all PNG to JPG to save space.

    • Assuming all of the photos are in the PNG/ folder, run the command from there
    # To see output and compress
    $ for i in *.PNG; do mogrify -resize 75% -format jpg "$i"; echo "$i converted to ${i%.*}.jpg"; done
    # To see output and compress and remove the PNG files
    $ for i in *.PNG; do mogrify -resize 75% -format jpg "$i" && rm "$i"; echo "$i converted to ${i%.*}.jpg"; done
  6. Move the PNG's that you have left back into the parent folder

  7. Copy the videos to a seperate folder to go through them

    • I don't like to keep them with photos, since they take a lot of room on Google Drive. I keep them on a computer and then back them up to a Cloud Backup Service
    • I'm trying to get into the habit of putting videos I want to keep onto YouTube!
    $ mkdir MOV
    mv *MOV MOV/
  8. Sort through, fix and delete files not in the above DATE_TIME format

    • Some I may want to keep and I'll rename them manually with the DATE_TIME format
    • Usually these are ones sent to me or from WhatsApp
    • .AAE files = delete
    • .GIF files = sometimes these are meme's I sort off into humor
    • .HEIC files = delete
  9. Move all photos into appropriate MONTH folder

    • All of my Photos are stored in /PHOTOS LIBRARY/YYYY-MM/
    • If there is a specific event.. /PHOTOS LIBRARY/YYYY-MM Christmas Day/
    • This is the "Master Copy" of all my photos. Any I want to upload to the cloud into a seperate event folder, I usually will make a copy of and put there. I feel a certain comfort with keeping photos in chronological order.
@nealalan

This comment has been minimized.

Copy link
Owner Author

nealalan commented Sep 9, 2019

Note: Need to add support for *HEIC file extensions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.