Recovering photographs from a memory card

I am an avid photographer and generally take a lot of photographs on my outdoor excursions. On my last trip the memory card in my camera became inaccessible, while trying to save the clicked photograph in it. Dozens of previously clicked photographs, also vanished without trace.

The camera’s image viewer simply refused to display any previously clicked images. My heart sank. Not only could I take more photographs throughout the trip, I also lost the few shots I had taken already. If it wasn’t for a good photograph recovery software for Windows, I’d have lost these photographs.

Recovered PhotographRecovered Photograph

Recovered Photographs

I had been planning for a while to recover photographs from that SD card. The photograph recovery software I found is one added reason to keep on coming back to Windows, despite all of its flaws. Some programs just work, without too much tinkering, when you have little time to satisfy your inner geek.

Most SD cards use the FAT filesystem, because its simple, well understood and there are free or embedded device driver implementations available easily out there for using this filesystem. I was trying to find out time to tinker with the details of the FAT filesystem, though after finding Zero Assumption Recovery, I feel no need to do so.

Cutting the long story short, this software recovered almost all of my photographs, that I had clicked. A few photographs could only be partially recovered, but these were too few and unimportant for me to worry about. This program is a shareware program, but the image recovery portion of the program is free for use.

Apart from the program, you may need a card reader. Your camera connected to the PC using a data cable may also work. I have been using a TECH-COM multiple card reader to access my SD cards, ever since I lost my camera’s data cable. The SD card I used to recover the data was a 2GB Transcend card, bought about a year ago. The card wasn’t in use for a long time. This was only the second time I was using it in my camera. A surprisingly short life, as far as I know, for a SD card. Two of my other SD cards - a 1 GB card and another 512 MB card, also from Transcend continue to work perfectly, after more than a year of frequent use.

Equipment

Equipment

This is not a complete review of this software. Although, it can recover files from NTFS, ext2/ext3 partitions, I did not test drive these features. The program has several other configurable options, but I just evaluated the photographs recovery feature. This is the only free feature of this program. Rest of the features are severely limited.

With the default options the program took 58 minutes to analyze the 2GB SD card in two phases. In the first phase it looks for any filesystem metadata blocks, followed by recovering the data blocks of each photograph file in the second phase. Out of total 592 photographs that could be recovered, 14 were incompletely recovered. This could be because the data blocks of those 14 photographs were overwritten. Even then a recovery rate of 98% is remarkable.

Incomplete RecoveryCompletely Recovered

Incomplete & Completely Recovered Photographs

There however seem to be several image recovery options to detect end-of-file, which decide the speed of data recovery. The dialog box below lets you choose these options. Image analysis is the default option. I chose the None option and this reduced the data recovery time to 5 mins from 58 mins earlier. The software was still able to recover all the photographs. Maybe in some corner cases, image analysis is a better option, though.

Image Recovery Options

End-of-file detection options for image recovery

The program seems to understand several file formats, including photographs, which means it can be more reliable when recovering these files. The screenshot below shows the dialog box where you can select the file formats which the software tries to validate while recovering the data.

File Formats

File formats validated

The screenshot below shows the photographs selection dialog, after it was done analyzing the SD card. Whenever you click on a photograph shown in the dialog box below, it shows a preview of that photograph in a separate window, as shown above. One annoying behaviour of this dialog is that it only shows photographs in incremental batches of 100. When you click on the link at the bottom of the tree, to show the next 100, it expands the tree and scrolls back to the top. Then you’ll have to scroll back down, to get back to the next photograph. If you are not careful enough, to keep track of which photograph you were viewing last, you’ll lose track of where to start again.

Recovered Files

List of photographs recovered

The program, however, is not without other flaws. It crashed after completing the two recovery phases i.e. making me wait for more than an hour. It again crashed immediately with a memory access violation error, as soon as it executed the second time. I was finally able to get it to recover my files on the third attempt. Three hours of labour, but finally I had the photographs I needed. If the end-of-file selection option was known to me earlier, I’d have been able to recover the photographs much faster.

For a complete walkthrough with screenshots for each step of recovery, check out this tutorial.

Add 42klines search engine to Firefox’s search bar

I wanted an easier way to get to the 42klines search engine I created for UNIX programmers. So, I found out a few ways to put it on the Firefox search bar (IE7 supported as well). There are easy ways and another slightly more hands-on, pull up your sleeves, grab the tools and get to work type.

The 3-step Install
First the easy one. Mozilla provides a Firefox extension called Add to Search Bar, which can apparently add any search bar on any website to the Firefox search bar. These are the steps:

  • Install the extension.
  • Right click on the 42klines search bar and select the “Add to Search Bar…” option
  • Change the name of the engine in the dialog box that pops up, if you like and you are done.

More details here. So that was the easy way. You can use this method to add a search bar from any web page to your browser’s search bar. If that worked for you and you are not interested in knowing anymore, skip the rest of the post.

Generate Plugin & Install
There is another way to add a search engine to your Firefox search bar. There is an online search engine plugin generator available for generating search plugins at www.searchplugins.net. Here are the steps to follow:

  1. Register on the www.searchplugins.net website
  2. Go to the search engine page and make a search for the word TEST.
  3. When the search results appear, copy the URL in the browser’s location bar. For the 42klines search engine this is the URL.
  4. Go to the plugin generator page and paste the URL in the “Search URL:” field of the form.
  5. Fill up the rest of the form and create the search engine plugin.
  6. You will be given the option to add the search engine plugin to the search bar. Click on the link and you are done.

This method is useful for people who provide a search engine of their own. Their search engine will now be listed among all the other search engines listed on www.searchplugins.net if they made it public. You can also grab the generated plugin’s source file in the OpenSearch XML format from your account on this site. This allows you to use the source file to provide a link on your website, which triggers a javascript, which installs the search engine to a user’s browser search bar easily from your own website.

Getting down and dirty
Now how about getting down to brass tacks and do it the hard way. Mozilla provides a way to easily add search engines from their search-engine add page. But what if the search engine you want to add is not listed among those. Or what if you have created your own search engine and want to allow people to add it to their browser’s search bar through a link on your web page? Read on.

To allow adding your search engine to a user’s Firefox browser search bar from your web page, you need to follow these two steps:

  1. Create an icon for your search engine and encode it in BASE64.
  2. Create a search engine descriptor file.
  3. Provide a link on your website which installs the search engine through Javascript.
  4. Optionally add search engine plugin auto-discovery support on your website.

Older browsers did not have the support for search bars, so you need not worry about them. Firefox 1.5 used another format called Sherlock for adding a search engine to the browser search bar. Newer browsers (Firefox 2.0+ & IE7) use a format called OpenSearch. The above links describe creating a search engine plugin using OpenSearch. OpenSearch allows a lot more than described in the links present in the above steps. Read through the documentation in case you are interested to know more.

Resources
Mozilla Mycroft Project: Search engine plugins for Firefox & IE7
Mycroft Plugin Generator: Advanced search engine plugin generator
Mycroft Search Engine Submission: Submit plugin to the Mycroft directory (OpenSearch format)
Mycroft Sherlock Submission: Mycroft page for submitting legacy Sherlock plugins
Mozilla Extensions: Create a Firefox extension if you like.
Encode data in Base64: Online tool you can use for encoding the search engine image in Base64.