Preparing photos for Facebook upload
Update: Improved version in a new post of mine.
A few tips for using Facebook and/or other services. You will need ImageMagick and Linux or Cygwin.
Order images correctly
Copying images to your computer, or rotating them, may ruin the files' time (of last modification). If your album contains images from several cameras, the file names can't be used to sort the images either. The following command renames the files to the second they were taken (see Exif).
c=0;for i in *.jpg;do t=`identify -verbose $i |egrep 'Exif:DateTime:'|sed 's/[^0-9]//g'`; mv $i "$t-$c.jpg";c=$[ $c + 1 ];echo $i;done
Remove excess information
Be sure you don't share more than you mean to! Also, saves you a couple of bytes to upload. (Copy files to a new folder first.)
for i in *.jpg;do mogrify -strip -resize 604x604 $i;echo $i;done
Of course, for some services, keeping the metadata could be useful.
Anonymize file names
Finally, you may want to rename the album file names:
c=0;for i in *.jpg;do f=`printf "%04u" "$c"`;mv $i $f.jpg;c=$[ $c + 1 ];done
Created on Sat, 17 Oct 2009 15:23
blog comments powered by Disqus