tags:

views:

651

answers:

4

Example of data

06-7-1-B.png
06-7-2-B.png
07-3-1-B.png
07-3-2-B.png
06-6-1-P.png
06-6-2-P.png
07-12-1-P.png
07-12-2-P.png
07-6-1-P.png
07-6-2-P.png
07-7-1-P.png
07-7-2-P.png
08-2-1-P.png
08-2-2-P.png
08-2-3-P.png
08-7-1-P.png
08-7-2-P.png
08-7-3-P.png
08-7-4-P.png
08-9-1-P.png
08-9-2-P.png

I want to join the files together as follows. For instance, the files 06-7-1-B.png and 06-7-2.png should be joined together and renamed as 06-7-B.png.

How can you create one file either png or pdf from many png -files in terminal?

A: 

Can you elaborate on how you want them "joined together"?

Do you just want to append the bits from one file to the next file? Or do you want to create an animated PNG?

Michael Pryor
+3  A: 

You need to be clearer in what you mean by "joining" two images, it is not obvious. You could mean anything from creating a montage, i.e. "glueing" the images together side-by-side, to some kind of "composition" where the images are stacked on top of each other, perhaps using alpha-channel transparency to let lower layers shine through.

For many of these, you should look into ImageMagick as a way of doing it from the command line.

unwind
@unwind: I mean to put one image at the bottom of another image such that the image with smallest sheet number for a given exercise is at the top.
Masi
+1  A: 

You can do this with the Netpbm tools. Netpbm is a collection of small quick tools meant to be used from the command line (or scripts). There are many tools, each with its own purpose, and they can be chained together with pipes to do complex operations. See the documentation.

There's also ImageMagick, but in most cases Netpbm will run more quickly and use less memory. If you have smallish images this won't be a concern.

dwc
+2  A: 
Alan