ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

http://imagemagick.org/

Examples of ImageMagick Usage

http://imagemagick.org/script/command-line-processing.php

Command-line Tools: convert examples

convert -background lightblue -fill blue -font Candice -pointsize 72 label:Anthony label.gif


 convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 -draw "text 25,60 'Magick'" \
    -channel RGBA -gaussian 0x6 -fill darkred -stroke magenta -draw "text 20,55 'Magick'" fuzzy-magick.png

Re: batch resize in a folder?

Postby fmw42 » 2009-09-04T19:08:55+00:00 cd to the directory where your images are located (temp) after creating a new directory to hold the changed files (say, temp2)

mogrify -path fullpathto/temp2 -resize 60×60% -quality 60 -format jpg *.png

this will take all png files in your current directory (temp), resize to 60% (of largest dimension and keep aspect ratio), set jpg quality to 60 and convert to jpg.

see

http://www.imagemagick.org/Usage/basics/#mogrify

Pour fabriquer rapidement des boutons

Pour changer des couleurs

Simple

identify -verbose mw_box_tl.png Histogram:

chercher dans Histogram la plus grande valeur, donne une idée de la couleur la plus répandue

     671: (161, 15, 21) #A10F15 rgb(161,15,21)

puis

convert mw_box_tl.png -fuzz 15% -fill "rgb(207,0,99)" -opaque "rgb(161,15,21)" output.jpg

Scanner / appareil photo

prendre les photos avec un pied puis

ls -1 *.jpg | while read i
do
#conversion couleur noir-blanc
convert $i -colorspace Gray $i test.jpg
#on deplace le coin haut gauche origine a -400 -300
convert -crop 3000x2300+400x300 test.jpg test1.jpg
#on deplace le coin bas droite
convert -crop 3000x2300-600-300 test1.jpg nb/$i
done
 
info/imagemagick.txt · Dernière modification: 2011/12/16 09:37 par radeff
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki