ImageMagick¶
$ su -c "yum install ImageMagick"
convert¶
Redimensionar imagen¶
$ convert xbmc-2.png -resize 800x500 xbmc-2.png.new
$ convert xbmc-2.png -resize 25% xbmc-2.png.new
Recortar imagen¶
$ convert weechat-split-windows.png -crop 1024x800 weechat-split-windows.png.new
Para definir la posición inicial:
$ convert weechat-hide-title-bar.png -crop 1280x800+1366+0 weechat-hide-title-bar.png.new
En este caso se está corriendo el inicio en el eje horizontal a +1366 pixels.
¿Qué fuentes tengo disponibles?¶
$ convert -list font
Path: /usr/lib64/ImageMagick-6.6.5/config/type-ghostscript.xml
Font: AvantGarde-Book
family: AvantGarde
style: Normal
stretch: Normal
weight: 400
glyphs: /usr/share/fonts/default/Type1/a010013l.pfb
Font: AvantGarde-BookOblique
family: AvantGarde
style: Oblique
stretch: Normal
weight: 400
glyphs: /usr/share/fonts/default/Type1/a010033l.pfb
...
...
...
Font: Waree-Oblique
family: Waree
style: Oblique
stretch: Normal
weight: 400
glyphs: /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
Font: wasy10-Normal
family: wasy10
style: Normal
stretch: Normal
weight: 400
glyphs: /usr/share/fonts/lyx/wasy10.ttf
Conversión de pdf a png¶
La conversión ocurre de forma mágica, veamos un ejemplo.
$ convert archivo.pdf archivo.pdf.png
Este comando tan simple, produce tantos png como páginas haya tenido el pdf original.
$ ls archivo.pdf* -1 archivo.pdf archivo.pdf-0.png archivo.pdf-1.png
Note que se pueden usar otros formatos de salida.
$ convert archivo.pdf archivo.pdf.jpg $ ls archivo.pdf* -1 archivo.pdf archivo.pdf-0.jpg archivo.pdf-1.jpg
mogrify¶
mogrify, redimensiona, recorta, difumina, desmanchar, dither, draw on, voltear, juntar, re-muestrear, y mucho más. Mogrify sobrescribe la imagen original mientras que convert escribe hacia un archivo diferente.
Redimensionar imagen¶
$ mogrify -resize 800 gnome-shell-extension-search-fedora-packages-*
Recortar imagen¶
$ mogrify -crop 1024x800 gnome-shell-extension-search-fedora-packages-*
montage¶
Combine imagenes...
$ montage SAM_0266.JPG SAM_0268.JPG SAM_0283.JPG montage.jpg
