A Script to Download Webcam Images

08:46 Tue, 21 Jun 2011

Using a script to pull webcam images; the script uses a file with a list of URLs, the time to pull the images, and any conversions needed when the URL is time or date specific.

I wrote previously about setting up an iMac G4 to display photos and images. The images are from webcams around the world, pulled every few hours and displayed automatically. Now I go into some details about how I do that. (You can download the script at the bottom of this page.

What factors do you need to take into account when getting a webcam image? You need a URL. You might decide you want to get the image only during daylight, so you need some method of telling the script whether to download the image on this run or not. Some webcam URLs have a date or time embedded in them, so you need some way of generating that URL or of picking the latest image. You might want to display a caption with the image. Finally, you want to be able to rename the image since you could find name collisions (e.g. many websites use "webcam.jpg"), so you want to specify a name for the image.

    [continued...]

Categories: programming, unix, image

NASA's Mars Spirit Stops

17:37 Tue, 05 Jan 2010

You may know that NASA's Mars Exploration rover Spirit has been bogged in one place since about April 2009. It broke through the crust into soft sand, got bogged and then one wheel stopped working.

NASA Mars Rover Spirit Copyright NASA
Click for larger image in new window

From what I read, they're not hopeful of freeing it. The issue now is that dust is accumulating on the solar panels and, with winter approaching, they are not confident that the batteries will recharge. Which means the end of it.

It's too early to call for closing-drinks, but it's getting near.

Interesting to see a plastic shopping bag, and a well-used track heading off to the local shops and a pub, no doubt. That's where we'll have the last drinks.

It's done a great job. It's design brief was for an extendable 90     [continued...]

Categories: nasa, science, image

Adding a caption to NASA's Image of the Day

08:30 Mon, 21 Dec 2009

I recently wrote about converting text to an image, and gave a brief example using image magick. To recap, here's the command-line:

convert -fill white -background '#007a7a' -gravity "West" -size 300x50 caption:"address@domain.toplevel" email.jpg

One very useful way of using this text-to-image feature is to add a caption to an image. We will go through this and use NASA's Image of the Day as an example. (In actuality, image of the working week give or take a day. No image on the weekend, I'm afraid.)

If you're not familiar with it, NASA's Image of the Day is a high-scale photo released by NASA's PR department, usually chosen for its stunning imagery or its relevence to a science mission. It's been going for years and is a bit of an institution among the astronomy and science set.

The image used to be available on it's own page, along with some explanatory text and photo credits below. Having its own page meant that you could store a simple bookmark, which would never change, to view it every day.     [continued...]

Categories: unix, nasa, image

Making an Image of Text

08:32 Sun, 20 Dec 2009

Sometimes you need to make an image of text. Recently, I needed to show my email address in a place where I really didn't want to expose the text.

You can try and obfuscate it using well-known techniques such as "email at address dot org", but this would be in a place where it could sit for years, and I didn't want to expose it to ever-increasingly sophisticated spam harvesters.

I decided that it was worth the small inconvenience to users to show the text as an image. As you probably know, the point of using an image is that there is no text for a machine to harvest, yet a human can interpret it easily. You can see an example here (use your back button to return).

It is very easy to do, using Image Magick. Image magick is one of those amazing tools that becomes more and more powerful as you use it and realise what it can do.

For those interested, a text image like that is simplicity itself:     [continued...]

Categories: unix, image