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
41
votes
4 answers

Package MagickCore was not found in the pkg-config search path

I was trying to install rmagick and it always asks for PKG_CONFIG_PATH not configured. This happened multiple times to me, so I'm posting this as an issue and answering myself for anyone else facing same issue. User-MacBook-Pro:rsscom macuser$ gem…
Ashwin Yaprala
  • 2,737
  • 2
  • 24
  • 56
41
votes
1 answer

Resize an image with Paperclip

The Paperclip plugin for Rails has a resize option that keeps the image in proportion. According to Ryan Bates' Paperclip Railscast, to make sure that option is on, you have to add a greater-than sign in the end of the size for the style you're…
Yuval Karmi
  • 26,277
  • 39
  • 124
  • 175
41
votes
3 answers

How to convert a JPEG image into SVG format using ImageMagick?

How to convert a JPEG image into SVG format using ImageMagick?
jasonb
41
votes
9 answers

How to batch resize images in Ubuntu recursively within the terminal?

I have multiple images stored in a set of organized folders. I need to re-size those images to a specific percentage recursively from their parent directory. I am running Ubuntu 11.10 and i prefer learning how to do that directly from the terminal.
CompilingCyborg
  • 4,760
  • 13
  • 44
  • 61
41
votes
7 answers

Detect main colors in an image with PHP

I am trying to replicate the functionality that Dribbble.com does with detecting the predominant colors in an Image. In the image below you can see a screenshot from Dribbble.com that shows the 8 predominant colors in the image to the left. Here is…
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
40
votes
6 answers

Batch resize images into new folder using ImageMagick

I have a folder of images over 4MB - let's call this folder dsc_big/. I'd like to use convert -define jpeg:extent=2MB to convert them to under 2MB and copy dsc_big/* to a folder dsc_small/ that already exists. I tried convert dsc_big/* -define…
tekknolagi
  • 10,663
  • 24
  • 75
  • 119
40
votes
2 answers

ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h

I upgraded to imagemagick-7.0.4-3.sierra and now my previously installed RMagck 2.16 fails. I checked for MagicWand: $ find /usr/local -name MagickWand.h /usr/local/Cellar/imagemagick/7.0.4-3/include/ImageMagick-7/MagickWand/MagickWand.h So it…
anny_goerl
  • 642
  • 2
  • 8
  • 13
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
39
votes
7 answers

Convert and resize SVG to PNG

I am trying to convert SVG to PNG (or any raster format) and resize at the same time. I thought I would use ImageMagick for this task but it seems to be converting to raster before resizing. This results in a poor quality image. Is there a way to…
DJL
  • 2,060
  • 3
  • 20
  • 39
39
votes
12 answers

ImageMagick Brew installation with PHP Module in Mac OS X

I have installed ImageMagick using brew install imagemagick. This all worked fine and I can run any ImageMagick command from the Terminal / Command line. Now when I try to use the ImageMagick classes in PHP, I get an error Class 'Imagick' not found…
Wouter Konecny
  • 3,260
  • 3
  • 19
  • 26
38
votes
8 answers

What is the fastest way to generate image thumbnails in Python?

I'm building a photo gallery in Python and want to be able to quickly generate thumbnails for the high resolution images. What's the fastest way to generate high quality thumbnails for a variety of image sources? Should I be using an external…
ensnare
  • 40,069
  • 64
  • 158
  • 224
38
votes
3 answers

Extract layers from PSD with ImageMagick, preserving layout

I'm using ImageMagick to extract layers from a PSD, and it gets them all out fine with: convert image.psd image-%d.png But the resulting PNG images are of varying dimensions, depending on the actual contents of the layer. What I'd like is to…
Thom
  • 2,643
  • 2
  • 30
  • 33
38
votes
4 answers

PHP ImagickException: not authorized

Any ideas how to fix this ? ImagickException: not authorized `/tmp/magick-1552lvf2nIjaqx1W' @ error/constitute.c/ReadImage/412 I thought it was a permission issue so just to test it out i set my /tmp dir to 777. No change. Its driving me crazy.…
LukePOLO
  • 1,110
  • 3
  • 13
  • 28
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