Some information that might be of use to someone, at discount prices.

April 6, 2005

Thumbnail Image Grabber

Category: — badsegue @ 9:25 am

background

Here is a .NET application that downloads thumbnail images from various online image search engines. I use it to collect fodder for photomosaics. It’s not the most sophisticated program, and there are programs out there that will crawl a website and grab all the images. I haven’t found one that quite does what I want it to do, which is why I put together a custom script to handle it. This project is an extension of that script. It basically does what the image grabbing Perl script does, but is easier to use for those uncomfortable with scripts.

features

Yahoo! and Google were supported initially. Version .51 adds support for MSN, Flickr, and PBase.

The application is multi-threaded. A separate thread is used for getting page results each search engine. The thumbnail URLs are parsed and queued. A separate pool of threads dequeues URLs and downloads the image into the specified directory, with each search being stored in it’s own subdirectory. Images are added to a list view so they can be previewed while the downloads in progress. The list view can be toggled to a detail view which shows larger versions of the graphics. You can delete downloaded images by selecting them and hitting the DELETE key.

Some planned features:

  • Additional sites (Xusenet, …)
  • Installer/Uninstaller
  • Display images with preserved dimensions
  • Configurable number of image threads
  • get grabbing

    All you need to do is specify the search term and click Fetch!.
    You can control the number of images grabbed by setting the Stop and Start values. The Start value would be useful when you’ve previously fetched say 100 images, then decide you want some more. You can set the Start to 101 and bypass the ones you’ve already retrieved.
    You can see the images as they are retrieved. You can also monitor the Log panel, which shows the actual HTML pages retrieved, and the images as they are processed.

    issues

    I don’t do much .NET work, so some things may not be done optimally (or at all!). This is something of a learning exercise and a work-in-progress.

    One thing I’ve noticed is a problem introduced by .NET 1.1 SP1. Yahoo! apparently returns an invalid HTTP response header, which the pre-SP1 1.1 framework accepted. I had to add a configuration item to get that working again.
    You need .NET 1.1 installed. It used to work with 1.0, but I needed the Directory Browser control that is part of 1.1.

    download

    Here it is. This is just a zip with the .exe and a configuration file. Just extract the archive to a folder and click on the .exe to run it. To uninstall just delete the folder–nothing is installed in the registry or start menu.

    You will need to have the .NET framework v. 1.1 installed. You probably have it already, but if not you can get it from Microsoft. The config file is used to get around a problem between Yahoo and .NET 1.1 SP1. Yahoo returns an invalid HTTP response and .NET doesn’t like it. If you don’t have SP1 installed and are having this type of problem then try deleting the config file and re-running the program.

    conclusion

    Once you have the pictures you want you can feed them to the photo mosaic program. I’ve tried a few, and ended up using AndreaMosaic. It’s free, is fast, and I’ve had good results with it. There are several others out there as well, just do a search for “photo mosaic” and you’ll find a bunch of options.

    • • •

    No Comments

    No comments yet.

    Comments RSS

    Sorry, the comment form is closed at this time.