utilisation image magick sous linux

Mise à jour: 16 decembre 2021
Version: 1.0
Author: Jean-Louis Bicquelet-Salaün
Location: http://jlbicquelet.free.fr
Copyright: (c) 2021 Jean-Louis BICQUELET-SALAÜN
Frequently-Asked Questions built by makefaq.py

Imagemagick Frequently-Asked Questions

Pour plus d'information au sujet de cette faq, contactez Jean-Louis BICQUELET


FAQ Revised: vendredi 17 décembre 2021 16:07:24


Table of Contents

1. information
2. modification

1. information

1.1. Comment déterminer la taille d'une image?
Pour déterminer la taille d'une image
identify www.png
www.png PNG 128x128 128x128+0+0 8-bit sRGB 11784B 0.000u 0:00.000

Si on veut une réponse plus ciblée:

identify -format '%w %h'

Si on souhaite avoir ces valeurs dans

l=`identify www.png | cut -f 3 -d " " | sed s/x.*//`
h=`identify www.png | cut -f 3 -d " " | sed s/.*x//`
echo "largeur = $l , hauteur = $h"



2. modification

2.1. Comment convertir d'un format d'image à une autre?
Convertion de jpg en png
convert www.jpg www.png

Convertion de png en jpg

convert www.png www.jpg


2.2. Comment redimensionner une image?
Il faut utiliser l'option -resize.
convert www.png -resize 32x32 www_32x32.png



Copyright (c) 2021 Jean-Louis BICQUELET

This list of questions and answers was generated by makefaq.