Since I also uploaded thousands of photos and was looking for a way to increase the speed of my thumbnailing I decided to remotely thumbnail them from a Linux box achieving a massive speed boost.
Here follows a quick rundown of what I did some more details can be found at my blog:
http://blog.medin.name/2012/04/22/thumb ... ot-months/First I enabled and mounted the share via NFS from my linux box.
- Code: Select all
sudo mount DS_IP:/volume1/photo /mnt/photo/
Then I created a scripte like so:
- Code: Select all
#!/bin/bash
echo "Running in folder: $1"
pushd "$1"
shopt -s nocaseglob
if [ ! -d @eaDir ] ; then mkdir @eaDir ; fi
for f in *.jpg ; do
if [ "$f" == "*.jpg" ] ; then break ; fi
echo "$1 - $f..."
if [ ! -d @eaDir/$f ] ; then mkdir @eaDir/$f ; fi
if [ ! -f @eaDir/$f/SYNOPHOTO:THUMB_XL.jpg ] ; then convert $f -resize 1280x1280\> -quality 90 -unsharp 0.5x0.5+1.25+0.0 @eaDir/$f/SYNOPHOTO:THUMB_XL.jpg ; fi
if [ ! -f @eaDir/$f/SYNOPHOTO:THUMB_L.jpg ] ; then convert @eaDir/$f/SYNOPHOTO:THUMB_XL.jpg -resize 800x800\> -quality 90 -unsharp 0.5x0.5+1.25+0.0 @eaDir/$f/SYNOPHOTO:THUMB_L.jpg ; fi
if [ ! -f @eaDir/$f/SYNOPHOTO:THUMB_M.jpg ] ; then convert @eaDir/$f/SYNOPHOTO:THUMB_L.jpg -resize 320x320\> -quality 90 -unsharp 0.5x0.5+1.25+0.0 @eaDir/$f/SYNOPHOTO:THUMB_M.jpg ; fi
if [ ! -f @eaDir/$f/SYNOPHOTO:THUMB_S.jpg ] ; then convert @eaDir/$f/SYNOPHOTO:THUMB_M.jpg -resize 120x120\> -quality 90 -unsharp 0.5x0.5+1.25+0.0 @eaDir/$f/SYNOPHOTO:THUMB_S.jpg ; fi
if [ ! -f @eaDir/$f/SYNOPHOTO:THUMB_B.jpg ] ; then convert @eaDir/$f/SYNOPHOTO:THUMB_L.jpg -resize 640x640\> -quality 90 -unsharp 0.5x0.5+1.25+0.0 @eaDir/$f/SYNOPHOTO:THUMB_B.jpg ; fi
done
popd
And finally I changed directory to the NFS mount point and ran the following command:
In most cases you probably wanna try this out on an isolated folder somewhere (
so dont run this from the root folder unless you know what you are doing 
)...
- Code: Select all
find . -type d -name @eaDir -prune -o ! -name @eaDir -type d -exec ~/tn.sh {} \;
Don't forget to substitute ~/tn.sh with the location of your script (above).
Now this is probably not the best idea in the world since it most likely voids your warranty or some such but for me it worked and I think the only real snag is that the files have the wrong uid/gid set on the machine apart from that everything seems to be pretty identical to allowing synology to run this.
Would be nice if the people over at synology could provide a sanctioned way to do this...
// Michael Medin