Animated gifs of Llandudno galleries
June 16, 2013 - Geekiness
You can find a guide to creating animated gifs on linux at the bottom of this post: how to make animated gifs on linux
We went on holiday last week to Llandudno. The main motivation was getting to see Bill Bailey, but we also engaged with some other cultural activities (motivated in part by persisitent drizzle). The copper mines are highly recommended, as is the Great Orme Tramway, although the views from the top were more misty and atmospheric than we’d hoped. The Mostyn Art Gallery was my favourite destination; there were several interactive displays which I will now show you through the medium of animated gif artwork.
This animated gif shows my companions contributing to a piece of art where the viewer was asked to rearrange the blocks. I’m not sure the gallery staff had anticipated visitors placing blocks on the burglar alarms, but…
The following animated gif shows a pingpong exhibit, where visitors were encouraged to have a game.
I particularly like the floating ball bit
How to make animated gifs from ordinary photos, on Linux
First, take some photos. I think these work best if your photos are fairly video-like, but you don’t need a tripod or anything like that. The photos above were taken with a standard Canon DSLR and I didn’t use any timelapse software, just took lots of photos from a similar viewpoint.
Second, get the photos onto your linux computer.
Third, install ImageMagick. The following command will do the job, on Debian-based systems:
sudo apt-get install imagemagick
This will install a set of tools which includes image conversion utilities. The ImageMagick homepage has a load of information on how this works; I’ll show you two of the things you can do here.
Fourth, resize your pictures so that they’re not super-big. I resized the pictures above to 10% of their original size using the following two command lines:
for i in *.JPG; do convert -resize 10% $i small/$i; done
The first line is easy – it just makes a directory called small. The second line contains a bit of shell scripting, with a loop (for) and variables ($i). What it does is that it goes through all files which end in .JPG, and create a copy in the directory called small which is 10% the size of the original. To experiment with different sizes, just change the percentage; if your camera produces images with lower case jpg rather than upper case JPG then you’ll have to change that bit too (linux is case sensitive).
Finally, you have to make the actual animated gif:
convert -delay 20 -loop 0 *.JPG animated.gif
Delay is in 100ths of a second (so this command line has 20 hundredths-of-a-second for each frame). -loop 0 tells the gif to loop indefinitely.