Suramya.com Banner TopLeft Suramya.com Banner TopCenter Suramya.com Banner TopRight
Home Home
About ME About Me
About India About India
Hotlinks Hotlinks
Linux Related Knowledge Store
Linux Related Linux Related
mirror.suramya.com Mirror(s)
Miscellaneous Stuff Misc Section
My Blog My Blog
Photogallery Photogallery
Scripts Scripts/Programs
Technical Section Technical Section
Contact me Contact Me
Guestbook Sign my Guestbook
My Resume My Resume


Scripts.suramya.com -> CollageGenerator

Collage Generator: Introduction

Hi Everyone,

CollageGen is an application that which displays Yahoo Image Search results for the specified query, in the form of a collage. The application has the following two components

  • The frontend: A PHP page that allows the user to submit a search term.
  • The backend: A Perl script that processes the input and generates the Collage

The backend performs an image search using the Yahoo API and downloads the appropriate images to the server and then creates the collage using a perl script that uses the Imager module. The two modules communicate with each other using XML-RPC.

The program is still in Alpha but appears to work without any major problems. However, if you find any errors please let me know.

Thanks,
  Suramya
 

CollageGenerator: Download

Download CollageGenerator Ver 0.5 from here


CollageGenerator: Changelog

04th Feb 2006: Version 0.5 of CollageGen released

  • 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

16th Sep 2005: Version 0.3 of CollageGen released

  • 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

29th Apr 2005: Version 0.2 of CollageGen released

  • 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

18th Mar 2005: Initial release of CollageGen

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

CollageGenerator: To Do

To do Item's for the CollageGenerator:

  • Add thread support
  • Allow multiple clients to talk to the backend at the same time
  • Add support to generate stats
  • More to be added as and when I think of them

CollageGenerator: Installation

Prerequisites:

Installing the Prerequisites:

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

  • cpan -i Getopt::Long
  • cpan -i LWP::Simple
  • cpan -i IO::File
  • cpan -i Imager
  • cpan -i Frontier::Daemon
  • cpan -i LWP::UserAgent
  • cpan -i HTTP::Request
  • cpan -i HTTP::Headers

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 Backend:

Download CollageGenerator from Here and save it to any desired location. Edit the Backend/CollageGenerator.pl file and search and replace the following items with the correct values for your setup:

  • IP_ADDRESS: Replace this with the IP address of the system running the CollageGenerator Backend
  • HOME_DIRECTORY: Replace this with the directory where you extracted the CollageGenerator Backend
  • CLIENT_HOST: Replace this with host information to allow the server to scp the result to the client system

Installing CollageGenerator Frontend:

Copy the files from Frontend/* to a Webserver. Edit the process.php file and replace IP_ADDRESS with the IP address of the host running the CollageGenerator Backend.


CollageGenerator: Usage

Once you customize CollageGen, start it from a command prompt using the following command

perl CollageGenerator.pl &

This will start the CollageGen backend and put it in the background. Now load up your browser and navigate to the where you installed the CollageGen frontend. Enter the search term in the box provided and wait for the result to show up. Thats it. :)


CollageGenerator: Credits

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
CollageGenerator: Conclusion

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


| Home| About Me| About India| Hotlinks| Linux Related| Mirror(s)| Misc Sec|
| My Blog| Photogallery| Scripts Section| Technology Section| Guestbook| My Resume|

04741 Visits
since 18th Feb 2006