lunes, 22 de agosto de 2016

How to process your photo album for displaying

With the increasing use of digital cameras we now tend to take hundreds of pictures of any event, I have accumulated more than 27.000 (~100G) in photos from the last 10 years, and its very hard to go back an look at them, some times there are 10 or more versions of the same picture which is boring.

What I want to do here is to make a digital album of my photos in a tablet, so when some one come to visit we can take it out and remember the old times. All the photos should fit in a microsd card (I have one 16G, but will be reasonable to buy one up to 64G), only best picture of a series of similar photos are required. And finally this process should be automated.

So let get started.

Backup your photos
Always keep a backup of your original photos in a safe place (external hard drive or external location), you probably at some point want to print and enlarge some of them (wall art or something) and you will need best resolution posible for this.
rsync -avni --delete source/ dest/
Copy only photos to the new location for processing ~100G in photos and video end up in ~42G with only photos
cd /source 
find . -iname '*.jpg' -o -iname '*.bmp' -o -iname '*.png' | cpio -pdm /dest

Resize photos
If you are using a tv or tablet to display your photos, you won't need full resolution in most cases, this devices has 1280 to 1920 resolution in most cases (except for 2k or 4k display), I will resize mine to 1024 to save some space 42G end up in ~6h and only 12G
You will have to do this for each file extension
find . -iname '*.jpg' -exec mogrify -resize 1024 '{}' \;
find . -iname '*.png' -exec mogrify -resize 1024 '{}' \;

Remove duplicates
For these I will use a "Donation-ware" windows program call VisiPics ( (can run on wine), this program search and finds similar images, and can auto select the best version (best resolution, less blury, etc), this isn't perfect and some decent photos will be removed, but for this case I don't care, I just don't want (and don't have the time) to review thousands of photos.

- Open the program and add your folder to the list
- In filter tab, select just one bar up from Loose.
- Press play and wait until finish.
- Press Auto-select button on Tools and wait until finish.
- Press Delete button on Actions.
Visipics run for ~1h looking for duplicates and my album end up sizing ~8G.