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
5
votes
1 answer
remove white background with ImageMagick but not the white inside picture?
im trying to delete the background with a batch process in pictures of products for an e-commerce site.
The problem is that the script also remove the white color in the inside of the product, leaving the product transparent in some areas..
For…

JonTargaryen
- 1,317
- 3
- 11
- 18
5
votes
2 answers
Can ImageMagick be prevented from overwriting an existing image?
When converting an image, ImageMagick's default behavior seems to be to overwrite any existing file. Is it possible to prevent this? I'm looking for something similar to Wget's --no-clobber download option. I've gone through ImageMagick's list of…

oronymzy
- 59
- 1
- 5
5
votes
1 answer
Firebase Cloud Function Error To Generate Thumbnail: spawn convert ENOENT
The cloud function was working good before updating it. This is the code where the error occurs now:
return spawn('convert' ,[tempLocalFile, '-thumbnail', `${THUMB_MAX_WIDTH}x${THUMB_MAX_HEIGHT}`, tempLocalThumbFile], {capture: ['stdout',…

Muhammad Mehar
- 1,015
- 7
- 10
5
votes
1 answer
Where is convert in ImageMagick?
I just spent an infuriating day trying to make a gif out of a series of jpg files in R. I installed ImageMagick to run the following code:
system("convert -delay 40 *.png example_4.gif")
but I get the following error message:
Warning…

unknown
- 853
- 1
- 10
- 23
5
votes
2 answers
ImageMagick Crop Tall image into A4 PDF pages with same width dynamic height
how can we make a tall-dynamicheight-screenshot.png into onefile.pdf with multiple pages in A4 so it could be readable when its printed?
example like this :
into A4 pages like
so when we print it would be like
not like (unreadable)

Adam Ramadhan
- 22,712
- 28
- 84
- 124
5
votes
1 answer
Export .svg to .png without (any) antialiasing (`+antialias` doesn't work)
I'm trying to export a svg file to an icon sized .png. The problem is that I can't seem to be able to force ImageMagick to not to use antialiasing.
It seems to me that +antialias only turns off between colors aliasing but doesn't prevent…

Petrroll
- 741
- 7
- 29
5
votes
1 answer
Cropping with ImageMagick always results in 1x1 images
I'm trying to crop an image into a bunch of 256x256 tiles (with the right-most and bottom-most images less than 256 pixels due to the remainders), but ImageMagick always generates images that are 1x1.
I use this command (Windows 7 command…

Steve A
- 1,798
- 4
- 16
- 34
5
votes
2 answers
How to change the convert command to python code
I'm using Imagemagick for image enhancement in my project. As I'm a newbie to Imagemagick, I have started it with using command line argument for this package. For further processing, I need to change the below command into python code.
convert…

Vijesh Venugopal
- 1,621
- 15
- 26
5
votes
3 answers
nodejs pdf to image conversion
I am using https://www.npmjs.com/package/pdf-image.
var PDFImage = require("pdf-image").PDFImage;
var pdfImage = new PDFImage("brochure.pdf");
pdfImage.convertPage(0).then(function (imagePath) {
// 0-th page…

Pritam Parua
- 672
- 2
- 8
- 27
5
votes
1 answer
How to store ImageMagick output into Bash variable (and then use it)?
I use ImageMagick and need to do conditional resize of images.
For that I store results of the identify tool into variables.
$infile='test.jpg'
width=$(identify -ping -format %w $infile)
height=$(identify -ping -format %h $infile)
But before…

Valeria
- 95
- 6
5
votes
1 answer
Prevent ImageMagick converting to grayscale
I'm using ImageMagick-6.9.1 on Windows to resize a PNG file before processing it with another tool. The source file is RGBA, but the image data is grayscale (all pixels have the same value for R, G, and B). It appears that ImageMagick is detecting…

superstator
- 3,005
- 1
- 33
- 43
5
votes
3 answers
Need to crop+resize ~300000 files. Runtime = 4+ days. How can I speed up my bash script?
I am working on creating a video timelapse. All the photos I took are .jpg images shot at 4:3 aspect ratio. 2592x1944 resolution. I want them all to be 16:9 at 1920x1080.
I have written a little script to do this, but the process is not very fast.…

Brian C
- 1,333
- 3
- 19
- 36
5
votes
2 answers
Why am I losing image quality with imagemagick when reducing a very large image to a much smaller image?
I have a bunch of images that I want to convert into a single PDF, the images are primarily images of text (similar to scanned images of a textbook). The image files are extremely large, I have no need for the amount of resolution that they offer. …

Jens Bodal
- 1,707
- 1
- 22
- 32
5
votes
1 answer
How to avoid Imagemagick's convert overlay of frames in a gif
I have a bunch of files labelled 1.png and so on. I'm using the following command line to produce a gif animation:
convert -delay 20 *.png animation.gif
But the frames get superposed sequentially. I did not expect this behavior, what might be…

Alejandro D. Somoza
- 391
- 1
- 3
- 19
5
votes
2 answers
ImageMagick resize - set width for both landscape and portrait images
I'm trying to get images resized to a given width, with the height being adjusted proportionally - no matter if the image has landscape or portrait orientation.
I have two images I test the ImageMagick convert -resize command with and from what I…

JWK
- 670
- 2
- 6
- 16