“Found Art” with Flickr and Imagemagick

This little project was a result of me tinkering with an old HTC EVO 4g cell phone that nobody wanted. It is a small bash script that fetches an image off the Flickr public feed and “paints” it using imagemagick.

Example Result:

You can see some other examples in the archive.

#This grabs the first pic off of the Flickr public photo stream
wget -q -O- "http://api.flickr.com/services/feeds/photos_public.gne" | grep -o '<link rel="enclosure" type="image/jpeg" href="[^"]*' | grep -m 1 -o '[^"]*$' | xargs wget -c --output-document=flickr.jpg "$1" &&

echo "done downloading"
mv flickr.jpg randomimage.jpg &&
echo "done moving"

#lastItem used to number the "masterpieces" 
lastItem=`cat lastItem`
lastItem=`expr $lastItem + 1`

convert randomimage.jpg -paint 20 "$filename"

echo "$lastItem" > lastItem

echo "done converting"

cp "$filename" ../www/art/archive

mv "$filename" ../www/art/masterpiece.jpg

About these ads

One thought on ““Found Art” with Flickr and Imagemagick

  1. Pingback: AaronJLynch.com | Artsy Wallpaper Tech

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s