Auto photo resizing in Linux

I still haven't found an optimal photo editing workflow that I'm happy with. I guess photo management varies wildly between people and it very much depends on the tools you're using, but for me it goes as follows:

  1. Take photos on camera.
  2. Transfer to my Ubuntu desktop to a temporary folder, e.g ~/Pictures/temp.
  3. Use DigiKam to quickly go through and delete non-keepers and make any minor edits as needed.
  4. Once ready, move the remaining keepers to my synced Google Drive folder.
  5. Select a small handful I want to share with friends/family, resize them to 1920p and email them out.
The process works mostly well, except I hate having to do the manual resizing at the end. So I setup an automated workaround hack for this last step:
  • Install Watcher and configure it to monitor my Google Drive sync folder.
  • Make it copy all new/edited images to ~/Pictures/_resized.
  • Have another watcher job that monitors ~/Pictures/_resized and converts every new image to 1080p.
This all happens dynamically in real-time with no user intervention on my part. So when it comes to step 5 to send emails, I can just browse the _resized folder and select whatever I need.

For anyone interested in going down this path, here's my watcher jobs.yml file:
---------------------------------------------------------------------------------------------

job1:
  label: Resize images in _resize folder
  watch: /home/richard/Pictures/_resize
  exclude: []
  events: ['create', 'move_from']
  options: []
  recursive: true
  command: convert $filename -resize 1920x1028! -quality 90 $filename

job2:
  label: Move files to _resize folder
  watch: /home/richard/Google_Drive/SYNC
  exclude: []
  events: ['create', 'move_to', 'modify', 'attribute_change', 'write_close']
  options: []
  recursive: true
  # the --parents retains the same folder hierarchy structure in the destination
  command: cp -f --parents $filename /home/richard/Pictures/_resize/
---------------------------------------------------------------------------------------------

I keep this file and the watcher installation in ~/.watcher/

And just run the watcher.py job on system startup (add watcher.py start).

There's a log file in the watcher dir, which can come in handy for debugging, but all in all, this works pretty well for me.

Comments

Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word