ImageMagick is an open-source and powerful command line Image processing tool. Here you can learn about ImageMagick. Recently, many batch image processing work has been involved. using this tool, we feel that its functions are very powerful and convenient. we will record the functions used as follows...
ImageMagick is an open-source and powerful command line Image processing tool. Here you can learn about ImageMagick.
Recently, many batch image processing jobs have been involved. using this tool, I feel that it is very powerful and convenient. I have recorded the features currently used as follows: working platform: Ubuntu 10.04:
1. use the convert command to change the image size.
1.1. maintain the ratio of length to width and the height is changed to 256:
For jpgfile in 'Ls'; do convert $ jpgfile-resize x256 new _ $ jpgfile; done
1.2. the length and width are reduced to 50% of the original size.
For jpgfile in 'Ls'; do convert $ jpgfile-resize % 50 new _ $ jpgfile; done
2. splice two images and run the convert command.
2.1 horizontal stitching
Convert 1.jpg 2.jpg 3.jpg + append result.jpg
2.2 Longitudinal stitching
Convert 1.jpg 2.jpg 3.jpg-append result.jpg
3. obtain image information and use the Identify command.
3.1 retrieve image width and height
Identify test.png | cut-d ''-f 3 | cut-d 'X'-f 1
Identify test.png | cut-d ''-f 3 | cut-d 'X'-f 2
Of course, more powerful functions of ImageMagick have not been used yet, so I will continue to summarize them.
Author: Peacock