Sep 17, 2011

Site layout and content has been updated. All sections except the Photogallery now use the new layout -> CollageGenerator



CollageGenerator is a Perl script that which displays Yahoo Image Search results for the specified query, in the form of a collage.

The script performs an image search using the Yahoo API and downloads the appropriate images to a temporary directory and then creates the collage using the Imager module for Perl.

This script is not the same as the CreateCollage script which I have also written. This program downloads images from the web based on the search terms to create the collage.

Download Link

Download CollageGenerator Ver 1.0 from here

Change Log

Ver 1.0: (24th Feb 2010):

  • Reverted back to a single script instead of Client/Server model used in previous
  • Updated script to account for Yahoo API changes
  • Added functionality to allow users to choose the no of images downloaded, the name of the output files and whether adult content is allowed in the collage.

Ver 0.5: (04th Feb 2006)

  • Rewrote the Backend Script to speed up the collage generator faster
  • Added XML-RPC support to allow better communication between the frontend and the backend

Ver 0.3: (16th Sep 2005)

  • Completely rewrote the CollageGen backend script to make the collage generation faster and more efficient.
  • Relaunch of the redesigned CollageGen website
  • Removed threading support from the script

Ver 0.2: (29th Apr 2005)

  • Rewrote the CollageGen backend to use threading. This version is 50% faster than 0.1
  • Script now uses the Imager module to create collages instead of using Webcollage

Ver 0.1: (18th Mar 2005)

  • Initial release of the CollageGen
  • Using the Webcollage script to create the collages
Installation Instructions


In order to use this script you need to have the following Perl Modules installed:

o Imager
o LWP::UserAgent
o XML::Simple

Installing the Prerequisites:

The easiest way to install the modules is to use the CPAN module. Run the following commands as root:

o cpan -i Imager
o cpan -i LWP::UserAgent
o cpan -i XML::Simple

If you don't have CPAN installed (I highly recommend installing it if you don't) download the modules from the CPAN website and install them manually (Instructions in the INSTALL file included in each module).

Installing CollageGenerator

  • Download the latest version of CollageGenerator from the Download section above.
  • Extract CollageGenerator from the CollageGenerator_vx.y.tar.gz where x.y identifies the version no. The current version is 1.0
    tar -zxvf CollageGenerator_v1.0.tar.gz
  • Make the script executable using the command:
    chmod a+x

Once you finish the steps above you are ready to make collages. See the Usage section below for usage instructions

Usage Instructions

Usage: SearchTerm OutputImage.jpg <result quantity> <allow adult results>


SearchTerm        : Search term using which a collage is created. (Required)
OutputImage.jpg : Name of the output file where the resultant collage is saved. (Required)

Optional Parameters:

results_quantity : No of images to download for creating the collage. Default 10, Max 50 (Optional)
allow_adult        : The script filters out adult content. Enter a 1 to allow adult content. Default '0' (Optional)

Examples: query=roses collage.jpg

will create a image called collage.jpg and use the images returned by an Image search for 'roses' to create a collage. girls collage.jpg 30 1

will create an collage using the upto 30 images returned by a search for 'girls' including any adult content


I would like to thank the following people without whose help writing CollageGen would have been a lot harder:

  • Siddharth Uppal (siddhuATgmailDOTcom): For writing the perl code for Yahoo Image search
  • Jamie Zawinski: For creating Webcollage from which I learnt a lot about perl's image manipulation capibilities
  • Creators of the Imager module for Perl
  • Creators of Perl
  • Vinit and Surabhi for their encouragement and help in testing
  • Benjamin A. Okopnik, for his help in figuring out how to download files using perl
  • The Answer Gang @Linux Gazette for their help and suggestions
Updates and corrections

If you use this program make sure you let me know. It will give me a warm fuzzy feeling when I know that someone is using my programs.

If you think that any of the infomation in this section is incorrect or you would like to suggest some changes/updates please and let me know.

- Suramya
  24th Feb 2010