Convert with extent option
Posted: 2019-07-16T00:02:38-07:00
Hello,
I'm trying to resize an image by adding a white band on the top of the image.
My original is a usually a square of 4000x4000.
The expected result is an image of 336x420 with the ogirinal in 336x336 on the bottom and white back on the top on 336x84.
I have written this command using documentation and other command I found on internet :
I'm facing this error :
I don't understand why because all examples I found with -extent option are having the same kind of parameter.
My current Image Magick version :
Many thanks by advance for you help,
Regards
I'm trying to resize an image by adding a white band on the top of the image.
My original is a usually a square of 4000x4000.
The expected result is an image of 336x420 with the ogirinal in 336x336 on the bottom and white back on the top on 336x84.
I have written this command using documentation and other command I found on internet :
Code: Select all
magick convert test.jpg -resize 336x420 -background white -gravity south -extent 336x420 testconvert.jpg
Code: Select all
convert: invalid argument for option '-extent': 336x420 testconvert.jpg @ error/convert.c/ConvertImageCommand/1575.
My current Image Magick version :
Code: Select all
Version: ImageMagick 7.0.8-21 Q16 x86_64 2018-12-28 https://imagemagick.org
Regards