convert -extent not working [Solved]
Posted: 2017-11-07T13:32:09-07:00
I have jpg images that are 4096x4096,
I want to extend the canvas 300 px on both sizes centering the image on the new canvas with transparent background for the new canvas only
So I do not want to change the original image, just pad it on both sides, and convert from jpg to png for transparency background.
This command will work without extending it:
convert in.jpg -alpha set -gravity center -extent 4096x4096 out.png
This one aborts with core dump
convert in.jpg -alpha set -gravity center -extent 4696x4096 out.png
I have tried -format png -resize 4096x4096
and Updated: -background none
mogrify also fails.
This will run as a bash command on over 100,000 files, so speed and quality is best
Running on Linux Manjaro (Arch Linux Clone)
convert -version
Version: ImageMagick 6.9.9-21 Q16 x86_64 2017-10-31 http://www.imagemagick.org
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf x xml zlib
Update: Upgrading to 7 fixed the issue.
Thanks
I want to extend the canvas 300 px on both sizes centering the image on the new canvas with transparent background for the new canvas only
So I do not want to change the original image, just pad it on both sides, and convert from jpg to png for transparency background.
This command will work without extending it:
convert in.jpg -alpha set -gravity center -extent 4096x4096 out.png
This one aborts with core dump
convert in.jpg -alpha set -gravity center -extent 4696x4096 out.png
I have tried -format png -resize 4096x4096
and Updated: -background none
mogrify also fails.
This will run as a bash command on over 100,000 files, so speed and quality is best
Running on Linux Manjaro (Arch Linux Clone)
convert -version
Version: ImageMagick 6.9.9-21 Q16 x86_64 2017-10-31 http://www.imagemagick.org
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf x xml zlib
Update: Upgrading to 7 fixed the issue.
Thanks