Tagged: Imagemagick

Cygwin Imagemagick error about missing arial.ttf

In ImageMagick under Cygwin, when using the -annotate option to put text into images, you may get the error: montage: unable to read font `/usr/share/fonts/TTF/arial.ttf’ @ error/annotate.c/RenderFreetype/1120. To fix: In Cygwin, type: mkdir /usr/share/fonts/TTF ln -s /cygdrive/c/Windows/Fonts/arial.ttf /usr/share/fonts/TTF/

Convert series of images to PDF

say I have a bunch of sequentially numbered PNG files (say from a scanner) and I want to make a PDF. Let’s say they’re named: page01.png page02.png page03.png … In Terminal, type: convert -page letter -adjoin page*.png out.pdf and in a few seconds a PDF out.pdf will be created. This uses ImageMagick.

Compute & Display Histogram with Imagemagick

In Terminal/Command Prompt, type: convert input.jpg histogram:png:- | display jpg:- where input.jpg is an image in ANY format that you want to display the histogram