I would like to try the CSS Sprite technique to load a few thumbnails as a single image. So I need to "merge" a few thumbnails in a single file offline in the server.
Suppose I have 10 thumbnails of the same size. How would you suggest I "merge" them from Linux command line?
You can also use GraphicsMagick, a lighter and faster fork of ImageMagick:
A simple time comparison of merging 12 images:
GraphicsMagick is almost twice as fast as ImageMagick.
Use the
pnmcat
of the netpbm-package.You probably have to convert your input files to and fro for using it:
You can also try ImageMagic which is great for creating CSS sprites. Some tutorial about it here.
Example (vertical sprite):
Example (horizontal sprite):
If you prefer to merge the pictures from left to right, use the following command:
Note the
+append
instead of-append
.