magick image resize

magick image resize

Notes › _DIFFUSION › Linux cli scripts

Cette conversation a été générée avec Duck.ai (https://duck.ai) à l’aide du modèle GPT-5.4 nano d’OpenAI. Les chats IA peuvent afficher des informations inexactes ou offensantes (voir https://duckduckgo.com/duckai/privacy-terms pour en savoir plus).

====================

Message 1 sur 1 de l’utilisateur - 26/06/2026 13:32:13: magick convert with resize

GPT-5.4 nano: Use ImageMagick convert like this:

1
magick input.jpg -resize WIDTHxHEIGHT output.jpg

Examples:

1
2
3
4
magick input.png -resize 50% output.png
magick input.jpg -resize 800x600 output.jpg
magick input.jpg -resize 800x output.jpg      # keep aspect, height auto
magick input.jpg -resize x600 output.jpg      # keep aspect, width auto

If you want exact size (crop to fill, not just fit):

1
magick input.jpg -resize 800x600^ -gravity center -extent 800x600 output.jpg