Saturday 26 May 2012

Digital Photo Frames

Digital Photos are great. No really, fantastic. But they are utterly worthless if no one gets to see them. You have couple of options. First, stick them all on Facebook. Alternatively, if you do not want to share your personal family life with the entire planet, carry them around with you on a phone (the twenty first century version of the photo in the wallet). Lastly, stick them in a digital photo frame, and stick it somewhere visible.

This post is about getting digital photos the right size and dimensions to display on a digital photo frame. Modern camera's take photographs at a resolution massively higher than modern digital photo frames can handle. So to compensate we have to reduce the size of the images so they display properly.

First of all dump all the images you are working with into one folder. Open a terminal and navigate to the folder where the images are. Secondly, spaces in the filenames will break this, so we have to replace them with underscores using this very handy command which I did not write because it uses SED!:

find . -name '* *' | while read file;
do
target=`echo "$file" | sed 's/ /_/g'`;
echo "Renaming '$file' to '$target'";
mv "$file" "$target";
done;

Anyway, if your frame has a resolution of 800x480 (common for small cheap frames at the time of writing) you can scale all of the images using:

for file in *.{jpg,JPG}; do echo $file && convert -resize 800x480 -quality 80 $file small_$file; done

The really handy thing with the [resize] command is that it doesn't change the aspect ratio, so it either fits the image to 800 wide, or 480 high, and then puts black lines in at the sides to fit the image in.

1 comment:

  1. Nowadays digital cameras and digital photo frames are becoming extremely popular.photos are the best way to re-live your moment. one thing i like about these frames is that these digital photo frame is durable..
    ticket frames

    ReplyDelete