Given a font file called font.ttf
, use the following to extract the letters and numbers as separate image files.
for i in {a..z} {A..Z} {0..9}; do convert -font font.ttf -pointsize 72 label:$i $i.gif; done
Using the identify
command from the ImageMagick package, we can print out the details of an image:
identify empty.gif
with the sample output:
empty.gif GIF 1x1 1x1+0+0 8-bit PseudoClass 2c 26B 0.000u 0:00.000
Flipping an image vertically or horizontally can be done with the mogrify
tool:
mogrify -flip image.png # to flip vertically mogrify -flop image.png # to flip horizontally