How to prepare a set of pictures for a digital photo frame

ImageMagickIn this example, we will prepare a set of raw pictures for use with a digital photo frame. The purpose is to reduce the file size, so the memory card can hold more pictures and the digital photo frame will be able to load the pictures fast. The purpose is also to normalize the colours and convert the pictures to a format, that the digital photo frame supports.

We will using ImageMagick 6.6.0.4 on an Ubuntu 11.10 operating system. The digital photo frame has a resolution of 480 x 234 and reads JPEG files from a memory card.

We make a directory, that will contain the prepared pictures.

mkdir memorex

We scale the pictures down, so at least the area of 480 x 234 pixels is filled. We crop the rest, equally from top and bottom, so the pictures now has a size of 430 x 234 pixels. We remove virtual layer information. We normalize the colours of the pictures. We convert all pictures to the JPEG format.

for i in `ls *.???`; do convert $i -resize '430x234^' -gravity center -crop 430x234+0+0 +repage -normalize memorex/$i'; done

As an alternative, we could use the following command, that uses the internal wild card option. However, if we have a lot of pictures, then this wild card would result in allocation of memory, that would cause the operating system to stop responding – and crash.

convert '*.*' -resize '430x234^' -gravity center -crop 430x234+0+0 +repage -normalize -set filename:name '%t' 'memorex/%[filename:name].jpg'

We copy the directory, with the prepared set of pictures, to the memory card. Remember, that memory cards often use the FAT file system, which only allow a certain amount of files in the root directory.

cp -r memorex /media/memcard

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.


Comments are closed.