info:imagemagick

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
info:imagemagick [2012/11/24 06:11] radeffinfo:imagemagick [2020/03/22 16:25] (Version actuelle) radeff
Ligne 1: Ligne 1:
-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.+====== ImageMagick ====== 
 +{{tag>pics}} 
 +//kw: imagik, imagick// 
 + 
 +voir aussi: imgp 
 + 
 +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/ http://imagemagick.org/
Ligne 33: Ligne 39:
  
 quelques exemples tirés de http://ubuntu.5.n6.nabble.com/Texte-sur-photos-td787025.html quelques exemples tirés de http://ubuntu.5.n6.nabble.com/Texte-sur-photos-td787025.html
-<code>+
 Ajouter un bandeau de texte bleu sur fond blanc au dessous d'image.jpg: Ajouter un bandeau de texte bleu sur fond blanc au dessous d'image.jpg:
  
-convert image.jpg -background white -font Helvetica -fill blue +<code>convert image.jpg -background white -font Helvetica -fill blue -pointsize 72 label:"phrase de test" -gravity Center -append image_avec_texte.jpg</code>
--pointsize 72 label:"phrase de test" -gravity Center -append +
-image_avec_texte.jpg+
  
 Ajouter un bandeau de texte bleu sur fond blanc au dessus d'image.jpg: Ajouter un bandeau de texte bleu sur fond blanc au dessus d'image.jpg:
  
-convert image.jpg -background white -font Helvetica -fill blue +<code>convert image.jpg -background white -font Helvetica -fill blue -pointsize 72 label:"phrase de test" +swap -gravity Center -append image_avec_texte.jpg</code>
--pointsize 72 label:"phrase de test" +swap -gravity Center -append +
-image_avec_texte.jpg+
  
 Ajouter du texte blanc surligner en noir sur image.txt: Ajouter du texte blanc surligner en noir sur image.txt:
-convert image.jpg -font Helvetica -pointsize 48 -gravity south -stroke 
-'#000C' -strokewidth 2 -annotate 0 "phrase de test" -stroke  none 
--fill white -annotate 0 "phrase de test" image_avec_texte.jpg 
  
 +<code>convert image.jpg -font Helvetica -pointsize 48 -gravity south -stroke '#000C' -strokewidth 2 -annotate 0 "phrase de test" -stroke  none -fill white -annotate 0 "phrase de test" image_avec_texte.jpg</code>
 +
 +<code>
 -pointsize permet de gérer la taille de l'image -pointsize permet de gérer la taille de l'image
 -gravity permet de gérer l'emplacement du texte sur l'image (south, -gravity permet de gérer l'emplacement du texte sur l'image (south,
Ligne 102: Ligne 104:
 done done
 </code> </code>
 +
 + $ convert rose.jpg -resize 50% rose.png
 +
 +====== resize before ftp ======
 +FIXME (on work)
 +
 +http://www.imagemagick.org/Usage/resize/
 +http://www.imagemagick.org/Usage/basics/#mogrify
 +http://www.imagemagick.org/script/mogrify.php
 +mogrify -resize 800 $i
 +
 +<code>
 +#!/usr/bin/bash
 +#/media/radeff/8cca64c2-83a1-4cf9-8f8f-3ba2b906dd42/photos/2015/20150723fabsamsung 417M -> 47M!!!
 +find . -size +300k | while read i
 +do
 +echo "mogrify -resize 1024 $i"
 +mogrify -resize 800 $i
 +done
 +</code>
 +
 +http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/
 +http://unix.stackexchange.com/questions/38943/use-mogrify-to-resize-large-files-while-ignoring-small-ones
 +http://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/
 +
 +Most command-line shells allow you to setup aliases and functions for complicated commands. If you use a bash shell, you can add a function to your .bash_aliases (or .bashrc) file that acts as an alias for my recommended command:
 +
 +smartresize() {
 +   mogrify -path $3 -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB $1
 +}
 +
 +Then, you can call it like this:
 +
 +smartresize inputfile.png 300 outputdir/
 +
 +
 +
 +
  • info/imagemagick.1353733871.txt.gz
  • Dernière modification : 2014/02/19 15:17
  • (modification externe)