Create a resized versions of photo collection and keep it in sync

0

This is for Windows, but I could run a virtual Linux client if there is an awesome solution not in Windows.

I keep a master photo collection, and I need to have it automatically sync to e resized copy for viewing on other slower devices.

How can I achieve this?

jonas

Posted 2013-01-23T12:47:00.567

Reputation: 101

Shopping recommendations are off topic. – ChrisF – 2013-01-23T13:07:41.007

Wasn't looking for anything to buy. But some system to manage my photo collection to maintain a resized copy. For all I know, it might be possible with a few lines of powershell or similar. I was just curious if someone already had a well-functioning solution. Could you recommend a more appropriate place to ask this question? – jonas – 2013-01-23T13:37:50.207

I've cleared the close votes here and reopened the question. It's based on an actual problem and seems specific enough so as not to become not constructive and attract a list of answers. I've removed the part where you were asking for "a tool" to do something—simply ask about what you need done. – slhck – 2013-01-23T14:18:24.460

Answers

0

If you are happy with a linux solution, then this would do it:

#!/bin/bash

FULLSIZE=/path/to/photos
SMALLSIZE=/path/to/smallphotos  # do not locate within FULLSIZE directory
MAXWIDTH=1024
MAXHEIGHT=768

cd $FULLSIZE
find . -name '*.jpg' -exec if [ ! -f  $SMALLSIZE{} ] then; do convert -resize $MAXWIDTHx$MAXHEIGHT $FULLSIZE{} $SMALLSIZE{} ; done \;

So this script looks for all files in the FULLSIZE directory, and below. It uses an if to check if there is a file with the same name in SMALLSIZE directory, and if not, uses the imagemagick convert command to resize the image to fit in a box MAXWIDTH wide, and MAXHEIGHT high and puts it into the SMALLSIZE directory.

Sorry, I didn't have time to test the script, hopefully it is bugfree.

Paul

Posted 2013-01-23T12:47:00.567

Reputation: 52 173

Thanks Paul, this might do it. I will wait a while and see if someone can do something similar in windows, since it's my preferred platform. – jonas – 2013-01-23T13:39:08.973

Also, I would have to implement support for more file system operations. In case files are moved around in the master collection or deleted, they should do the same in the resized collection. – jonas – 2013-01-23T13:49:52.387

@jonas: I'm sure the above can be translated to a batch file, PowerShell script etc., but it won't auto-sync. Perhaps you can schedule it to run periodically using Task Scheduler... – Karan – 2013-01-23T16:59:04.890

@jonas Yeah, I was thinking that too - what about modifications as well - if you do some processing on a file, you'd want it to be reflected in the small version – Paul – 2013-01-23T21:54:34.357