imagemagick

 

 

imagemagick

1 position

start point

0,0 – NorthWest

2 Cropping multiple images in batch mode

 

2.1 intro

tools: GIMP and mogrify (from the ImageMagick suite),

  • GIMP – graphically select the area to be cropped
  • mogrify – cropping.
 mogrify  -gravity North -chop 0x300 gap0.25ur3.92.jpg 
# remove 300  rows of pixels from the top
convert -crop 240x160+100+50 input.jpg output.jpg

convert -crop 1547x465+186+307 input.jpg output.jpg

convert -crop 388x148+380+622 input.jpg output.jpg

mogrify -gravity East -chop 960x0 *.jpg

mogrify overwrites the existing image
convert saves the image as a new image without modifying the original image
mogrify  -gravity North -chop 0x300 *.jpg   
mogrify  -gravity South -chop 0x300 *.gif
North South West East

mogrify -gravity West -chop 150x0 *.gif

1 pixel (X) = 0.0264583333 cm

pixel –>> cm https://www.blitzresults.com/en/pixel/

The asterisk makes bash fill in all png files in the current directory, and mogrify will handle them all happily.

2.2 cache resources exhausted

mogrify-im6.q16: cache resources exhausted `gap0.25ur3.92.gif' @ error/cache.c/OpenPixelCache/3984.

/etc/ImageMagick-6/policy.xml

change memory

3 combine side by side

  • Montage: Generate a thumbnail index of a list of images
montage 1.png 2.png -geometry 1920x1080+1+1 -quality 100 out.png
montage 1.jpg 2.jpg 3.jpg 4.jpg  -tile 2x2 -geometry +0+0 out.jpg
geometry size of the individual thumbnail images, and the spacing between them

 

Author: ka

Created: 2019-12-25 三 14:48

Emacs 24.5.1 (Org mode 8.2.10)

Validate

posted @ 2019-12-25 14:51  kaiming_ai  阅读(611)  评论(0编辑  收藏  举报