Questions tagged [imagemagick]

ImageMagick is an open source software suite for displaying, converting and editing raster image files.

The software mainly consists of libraries and a number of utilities for manipulating images.

File format conversion

One of the basic and thoroughly-implemented features of is its ability to efficiently and accurately convert images between different file formats. Over 100 different formats are supported.

Language Bindings

There are ImageMagick bindings for most popular programming languages including , , , , , , , , , , , and . There are also bindings for which only operate in Mac OS X and Linux, not iOS.

Distribution

is cross-platform, and runs on all recent versions of Microsoft Windows (except Windows 95), and Unix-like systems including Mac OS X, Linux, Solaris, and FreeBSD. The project's source code can be compiled for other systems, including AmigaOS 4.0 and MorphOS.

Resources

9193 questions
118
votes
4 answers

Convert PDF to PNG using ImageMagick

using ImageMagick, what command should i use to convert a PDF to PNG? I need highest quality, smallest file size. this is what I have so far (very slow by the way): convert -density 300 -depth 8 -quality 85 a.pdf a.png Looking at what Gmail does…
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
111
votes
3 answers

Detect EXIF Orientation and Rotate Image using ImageMagick

Canon DSLRs appear to save photos in landscape orientation and uses exif::orientation to do the rotation. Question: How can imagemagick be used to re-save the image into the intended orientation using the exif orientation data such that it no longer…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
104
votes
10 answers

Verify ImageMagick installation

My web hosting said ImageMagic has been pre-installed on the server. I did a quick search for "ImageMagick" in the output of phpinfo() and I found nothing. I can't SSH in the server so is there a way in PHP I can verify the installation?
Desmond Liang
  • 2,210
  • 4
  • 26
  • 32
103
votes
4 answers

Batch resize images and output images to new folder with ImageMagick

Current image folder path: public_html/images/thumbs Output image folder path: public_html/images/new-thumbs I have 10 video thumbs per video in current folder, named of image thumbs: 1-1.jpg 1-2.jpg 1-3.jpg 1-4.jpg 1-5.jpg…
richard
  • 1,456
  • 4
  • 15
  • 22
96
votes
1 answer

What is the difference for sample/resample/scale/resize/adaptive-resize/thumbnail operators in ImageMagick convert?

I found multiple ways to change the resolution of an image using convert: -sample -resample -scale -resize -adaptive-resize -thumbnail What's the difference of those? If I need to make various size large picture thumbnail with fixed aspect ratio…
est
  • 11,429
  • 14
  • 70
  • 118
94
votes
2 answers

GD vs ImageMagick vs Gmagick for jpg?

I am in the step to abandon GD for manipulating image in my website - it is awful. Everyone saying to use ImageMagick because they are better than GD, but what about ImageMagick vs Gmagick (Swiss Army knife of image processing)? Zend has a pretty…
dynamic
  • 46,985
  • 55
  • 154
  • 231
93
votes
5 answers

Storing image in database directly or as base64 data?

The common method to store images in a database is to convert the image to base64 data before storing the data. This process will increase the size by 33%. Alternatively it is possible to directly store the image as a BLOB; for example: $image = new…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
93
votes
4 answers

cache resources exhausted Imagemagick

I'm using Imagemagick on a rails app with Minimagick and I generate some pictogram with it. When I launch my process I have this error and I don't find a solution: MiniMagick::Error (`convert -limit memory 2GiB -limit map 2GiB -limit disk 4GiB…
Gregory Frerot
  • 1,141
  • 1
  • 8
  • 12
92
votes
12 answers

Converting a PDF to PNG

I'm trying to convert a PDF to a PNG image (at least the cover of one). I'm successfully extracting the first page of the PDF with pdftk. I'm using imagemagick to do the conversion: convert cover.pdf cover.png This works, but unfortunately the…
Adam
  • 1,467
  • 1
  • 15
  • 15
89
votes
2 answers

How do I modify a Homebrew formula?

I installed ImageMagick via Homebrew. However, due to a bug I have with my current configuration, I need to adjust the compile flags for the formula and reinstall it. How can I accomplish this?
maček
  • 76,434
  • 37
  • 167
  • 198
88
votes
6 answers

With ImageMagick, how can you see all available fonts?

ImageMagick can draw text into a picture in a given font, how can I see all available fonts for my system?
flybywire
  • 261,858
  • 191
  • 397
  • 503
85
votes
7 answers

What is the difference between ImageMagick and GraphicsMagick?

I've found myself evaluating both of these libs. Apart from what the GraphicsMagick comparison says, I see that ImageMagick still got updates and it seems that the two are almost identical. I'm just looking to do basic image manipulation in C++…
QbProg
  • 1,675
  • 1
  • 14
  • 18
84
votes
8 answers

Convert SVG to transparent PNG with antialiasing, using ImageMagick

I want to convert SVG images to PNG files with transparent background and anti-aliased edges (using semi-transparent pixels). Unfortunately I can't get ImageMagick to do the anti-aliasing, the edges always look terrible. Here's what I tried: convert…
Andreas Gohr
  • 4,617
  • 5
  • 28
  • 45
82
votes
3 answers

Converting GIF's, PNG's and JPG's to .ICO files using Imagemagick

From: JPG, To: ICO; /usr/bin/convert -resize x16 -gravity center -crop 16x16+0+0 input.jpg \ -transparent white -colors 256 output/favicon.ico This is the output for the command line. From: GIF's, PNG To: ICO; /usr/bin/convert -resize x16 -gravity…
Chris Braid
  • 821
  • 1
  • 7
  • 3
82
votes
4 answers

How do I crop an animated gif using ImageMagick?

There's plenty of information about cropping images, but attempting to crop (or trim) animations produces strange results. Sometimes they flicker, or come with extra frames, or some frames crop correctly and others become offset. How do I prevent…
jimmetry
  • 2,141
  • 2
  • 16
  • 12