Stitching images with append () in graphics


I have a large number of images stored on a separate server that needs to be displayed on a single page as a mosaic of some sort where the individual elements may be shown or hidden dynamically.

These images should be fetched, resized and then stitched together as a sprite, and used as background images on divs. Fetching and resizing is a non-issue at this point, as the biggest hurdle is understanding the append method, or rather how to add images to a set, in order to use said method.

According to the docs:



Append a set of images

How do I get multiple images into a "set"?

Best I could do, was as follows ...

var gm = require('gm')

  .write('crazy.png', function (err) {
    if (!err) console.log('crazytown has arrived');

Where images.txt is a list of images to append.

Have not yet been able to figure out how to pass a set of images other than an image list file.

Got the idea from the website -

When running a commandline utility, you can prepend an at sign @ to a filename to read a > list of image filenames from that file. This is convenient in the event you have too many > image filenames to fit on the command line.

Hope that helps LeeT