The "convert" command, from the ImageMagick® software suite is a program to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
Questions tagged [imagemagick-convert]
1387 questions
769
votes
14 answers
ImageMagick security policy 'PDF' blocking conversion
The Imagemagick security policy seems to be not allowing me perform this conversion from pdf to png. Converting other extensions seem to be working, just not from pdf. I haven't changed any of the imagemagick settings since I installed it... I am…

T. Zack Crawford
- 7,646
- 3
- 11
- 18
351
votes
11 answers
convert:not authorized `aaaa` @ error/constitute.c/ReadImage/453
I want to create a captcha pic by use convert from ImageMagick.
And I follow this, but there are some problem .
Input In my linux shell:
convert -background white -fill black -font FreeSerif-Bold -pointsize 36 label:'adfgh' ./test.png
The Error…

jianwei
- 3,561
- 3
- 11
- 4
65
votes
5 answers
ImageMagick: convert image to PDF with A4 page size and image fit to page
I want to convert different image formats (bmp,jpg,gif,png,tiff-incluging multipaged) into a PDF format with A4 page size and with images fit to page (resized if necessary). Image should be positioned at the center of the page and I'd like to define…

Mariusz Pala
- 961
- 1
- 8
- 17
54
votes
5 answers
ImageMagick: Lossless max compression for PNG?
I'd like to achieve a maximum amount of compression when saving to a lossless PNG using ImageMagick. I'm doing batch conversion of many PSDs.
I tried a few things, but it looks to me like the resulting PNG image is not as sharp as original image,…

Mladen Adamovic
- 3,071
- 2
- 29
- 44
47
votes
4 answers
ImageMagick: convert to keep same name for converted image
I am converting .psd to .png files inside folder with one. How to keep same name of every file in folder with different extension ?
For example I enter in folder images and then from terminal I execute
$ convert *.psd *.png
but it gives names to…

PaolaJ.
- 10,872
- 22
- 73
- 111
44
votes
3 answers
How to convert all files (in different formats) in given folder to different file type
I have a folder with many images from different types (png, jpg, jpeg, bmp, pdf), and I would like to convert them all into png (for instance) using imagemagick.
Is there a single command which can perform this? If not, what should I do…

Tal Galili
- 24,605
- 44
- 129
- 187
40
votes
4 answers
Converting a multi page pdf to multiple pages using a single command
I want to convert multi page pdfs into single page images efficiently.
I already know how to do this one page at a time with imagemagick. For example,
convert x.pdf[2] x3.jpg
will give me the 3rd page of the pdf as an image. So if I figure out how…

Moiz Raja
- 5,612
- 6
- 40
- 52
39
votes
10 answers
ImageMagick: No decode delegate for this image format `' @ error/constitute.c/ReadImage/504
Problem: ImageMagick convert is unable to crop image. It looks like it doesn't recognize the image type?
What I've Tried:
I've searched around online and I've seen several similar issues but not mine.
I've attempted their solutions…

Montag
- 625
- 1
- 6
- 12
38
votes
5 answers
Batch command for ImageMagick to convert all files in a directory and sub-directories on windows
I have thousands of SVG's in a folder and sub-folders. What I want is to batch convert all of them to jpg or png images.
Can someone help me write a command for ImageMagick (windows), which can find and convert all the svg's to jpg/png with their…

Key
- 628
- 2
- 7
- 15
37
votes
4 answers
ImageMagick convert pdf to jpeg has poor text quality after upgrading ImageMagick version to 6.7.8
After upgrading ImageMagick text quality got degraded when convert pdf to jpeg:
Old image
New Image
Conversion command: convert foo.pdf foo.jpeg
Old ImageMagick version:
[root@home]# convert -version
Version: ImageMagick 6.2.8 05/07/12 Q16…

Kuf
- 17,318
- 6
- 67
- 91
19
votes
5 answers
error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6
I have been trying to install ImageMagick in Ubuntu 16.04 to use with movie.py
I have installed ImageMagick 7 but when I check the version from the command line
convert --version
It gives error as
convert: error while loading shared libraries:…

Anuj TBE
- 9,198
- 27
- 136
- 285
18
votes
1 answer
Attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408
I am running a laravel project in my local ubuntu 20.04 machine that was functioning fine in another machine. The project uses Image Magic to convert PDF to PNG. While I am evoking the function to convert PDF into PNG I get the following…

Riwaj Chalise
- 637
- 1
- 13
- 27
17
votes
1 answer
How to add padding when using imagemagick to convert an EPS into a PNG?
How to add padding when using imagemagick to convert an EPS into a PNG?
I want to do something like:
convert logo.eps -size 128x128 logo.png
But want the actual logo to be 96x96px, centered, surrounded by a transparent background to reach 128x128…

user1680104
- 8,437
- 4
- 22
- 27
16
votes
3 answers
How to crop image from center without resizing with imagemagick
for parentDir in *
do
cd "$parentDir"
for subDir in *
do
cd "$subDir"
for file in *.*
do
convert "$file" -crop 120x95 summary_"$file"
convert "$file" -crop 160x225 detail_"$file"
…

Andy Li
- 277
- 2
- 3
- 7
16
votes
1 answer
How to adjust jpeg quality with Magick.Net
I am trying to set the image quality of two images appended to one another to 10% and resize the images to 40x40.
using (var images = new MagickImageCollection {designFile, swatchFile})
{
MagickImage sprite = images.AppendHorizontally();
…

Ryan Fisch
- 2,614
- 5
- 36
- 57