Adding a legend to a map
This trick add the legend to a map in a specific positon
composite -gravity southeast -geometry +10+10 leyenda.png mapa_sin.png mapa_con.png
This trick add the legend to a map in a specific positon
composite -gravity southeast -geometry +10+10 leyenda.png mapa_sin.png mapa_con.png
Adding margins for a A4 pdf
convert montado000.jpg -bordercolor white -border 70 -page A4 salida.pdf
Take into account that the order of the parameters is important and -bordercolor should appear before of -border or everything will be grey.
more ...Convert can be used to crop images
#!/bin/bash
mkdir cropped;
for i in `ls *.png`;
do convert -verbose -crop 1176x880+502+144 $i ./cropped/$i;
done;
echo FIN;
You can get an histogram of the colours used in an image
convert RASTER2.jpg -format %c histogram:info:-
convert -bordercolor black -border 2 image_sin.png image_con.png
convert -rotate 180 -gravity north -background blue -splice 0x5 contadorA.png contadorA_r.png
montage -tile x2 -geometry ...
For images resizing
#!/bin/bash
mkdir 640x480;
for i in `ls *.png`;
do convert -verbose -quality 65 -strip -resize 640x480 $i ./640x480/$i;
done;
echo FIN;
A trick for splitting an A3 in 4 A4
pdftk mapA3.pdf burst output pgmapa3%d.pdf
convert -density 600x600 -limit memory 32 pgmapa31.pdf pgmapa31.jpg
convert -verbose -crop 3508x4960 pgmapa31.jpg pgmapa31_%02d.jpg
convert -page A4 -resize '2480x3508^>' -extent 2620x3706 pgmapa31_0* pgmapa4.pdf
gs -sDEVICE=pdfwrite -dNOPAUSE ...
You can conver a GIF into a series of PNGs
convert * .gif -transparent white name-%d.png