Convert Image type¶
Imagemagick¶
Single¶
convert \
-verbose \
-density 150 \
-trim \
test.pdf \
-quality 100 \
-flatten \
-sharpen 0x1.0 \
24-18.jpg
Directory¶
Batch converting PNG to JPG in linux
for i in .png ; do convert "$i" "${i%.}.jpg" ; done
Crop¶
Imagemagick¶
convert stereo0000.png -crop 50%x100% foo.png
convert -crop 800x1000 image.png cropped_%d.png
convert stereo*.png -gravity East -crop 50%x100%+0+0 right%04d.png
convert stereo*.png -gravity West -crop 50%x100%+0+0 left%04d.png
Warning! This one is the most effective but also potentially destructive:
mogrify -crop 50%x100% +repage -path ./cropped *.png
(+repage resets image geometry)