Originally published on: Sun, 26 Apr 2009 14:46:51 +0000
I often receive e-mails from friends containing humorous images. One of my friends had forwarded an e-mail with a few dozen very funny images attached to it. I found the pictures to be so funny that I felt like posting them to an online forum that I frequent.
Unfortunately, this forum's image-upload feature only allowed for one image at a time to be uploaded. I was hoping to upload them as a group.
I had considered trying to capture some screenshots of a screenful each. An attempt at capturing, cutting, positioning, ...etc. proved to be tedious. I wanted a solution that I could use again. My thoughts turned immediately to the Perl interface to the ImageMagick library: PerlMagick.
Please note that ImageMagick libraries exist for many different programming languages. An ActiveX version is available so that any ActiveX-aware programming language ( including VBScript and Javascript WSH scripts ) can leverage ImageMagick. I had used PerlMagick before and often find good Perl examples via web-searches. I tend to think of PerlMagick and ImageMagick synonymously.
I found a sample program on the web that used the ImageMagick Append() method. When calling the Append() method, one may set the stack parameter attribute to true to force the newly-generated image to be comprised of a top-down set of all of the images in the image object, "stacked" on top of one another.
The following code reads for JPEG images ( i1.jpg, i2.jpg, i3.jpg, and i4.jpg ) and generates an image called stack.jpg that contains all of the above:
Unless otherwise noted, all code and text entries are Copyright ©2009 by James K. Lawless
Views expressed in this blog are those of the author and do not necessary reflect those of the author's employer. Views expressed in the comments are those of the responding individual.

Save to StumbleUpon
Digg it
Save to Reddit
Share on Facebook
Share on Twitter
More bookmarks
Click **here**
A JavaScript REPL for Android Devices
A Review of Kevin Mitnick's Book Ghost in the Wires
Play MP3 Files with Python on Windows
Converting Data to XML with AWK
Jim Butterfield : The Commodore Guru
Thwarting HTTP Referer Trackbacks
Switching a Console Window to Full Screen or Windowed Mode
A Simple Media Control Interface Script Processor
Why Some Web Sites will go Dark on Jan 18th
Book Review : Paull Allen - Idea Man
A 90's Experiment in Online Systems - The U.S. West CommunityLink Service