ImageMagick is a set of command line utilities to modify, transform, and convert images. The utilities are available for all major OSes.
67
votes
6answers
52k views
How to install rmagick on Ubuntu 10.04?
Here's what I've done so far:
sudo apt-get install imagemagick libmagickcore-dev
This did not throw any errors, so I think that ImageMagick is installed fine. Then I tried installing the gem:
sudo ...
20
votes
3answers
2k views
Convert HTML to image
Background
Batch convert various syntax-highlighted source files (C, SQL, Java, PHP, batch, bash) into high-resolution images (600dpi), suitable for an eBook and printed book.
Failed Solutions
A ...
16
votes
1answer
12k views
Combine multiple images using ImageMagick
I would like to combine multiple images into one image using ImageMagick. To explain a little better, I want the result to look similar to this:
That is, I have a number of screen shots, and I want ...
11
votes
6answers
8k views
I have compiled ImageMagick on my CentOS, and RMagick won't install
I installed ImageMagick through, (Using ImageMagick 6.7.3-7)
./configure --prefix=/usr && make && make install
When I try to
gem install imagemagick
I get
Building native ...
10
votes
2answers
510 views
Why is the gif I created so slow?
I am using ImageMagick to turn a collection of pngs into a single gif. I want this gif to loop as quickly as possible.
This is approximately the output I expect (courtesy of Wikipedia):
This is ...
9
votes
2answers
8k views
Using Ghostscript to convert multi-page PDF into single JPG?
I know Ghostscript can convert PDFs to JPGs, and in the case of a multi-page PDF, can rip each page to an individual JPG. But is it possible to have it rip them to one JPG, so that the pages are ...
8
votes
6answers
12k views
How to merge pdf:s using Imagemagick (resolution problem)
When I try to merge two .pdf files using Imagemagick
convert pdf1.pdf pdf2.pdf temp.pdf
the resulting temp.pdf file seems to have very low resolution. How can I keep the resolution same as in the ...
8
votes
2answers
2k views
Command Line loop to run command on all files in a directory (plus sub directories, if possible
I'm assuming this is fairly easy to do, but I have zero experience with Windows's command line utilities. Basically, I need to iterate over all files in a directory (great if it can do ...
7
votes
2answers
7k views
How do you re-install a package with Homebrew (Mac)?
Struggling to find good Homebrew documentation (or tutorial)...
In the mean time I need to reinstall ImageMagick that was installed with Homebrew (brew install imagemagick) and not sure if I should ...
6
votes
5answers
9k views
How to install RMagick RubyGem on Mac OS X 10.6 Snow Leopard?
I am getting this error while trying to install RMagick:
$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to ...
6
votes
4answers
1k views
How can I tell if my image is CMYK from Linux command line?
I'm converting images from RGB to CMYK. How can I tell if my image is CMYK from the Linux command line?
6
votes
2answers
172 views
Mass recoloring of PNGs from command line
Similar to the mass rescaling command this site taught me here, is there a command-line trick for mass recoloring?
To make it specific, suppose I have a bunch of images with RGB and alpha values:
...
4
votes
2answers
1k views
How to stretch an image in one dimension?
The title says much, but I'll explain in detail a little more.
I need to stretch an image in one dimension only. That is, if the image is for example, 100x100 (Width x Height) I need it to be 100x104 ...
4
votes
3answers
5k views
Command line to automatically crop an image?
By using Gimp's menu, you can automatically crop the image (removing white borders). I have a lot of images with white borders of different sizes. I want to remove them using Gimp in command line but ...
4
votes
3answers
3k views
I want to change DPI with Imagemagick without changing the actual byte-size of the image data
I feel so horribly sorry that I have to ask this question here, but after hours of researching how to do an actually very simple task I'm still failing...
In Gimp there is a very simple way to do ...
4
votes
1answer
2k views
ImageMagick - Replace the transparent part of a GIF with a solid colour?
I have a GIF file that has a transparent section. I want to replace that with just plain white (or some other colour), so that there is no transparent parts. Can I do this on the command line with ...
4
votes
3answers
3k views
Using GraphicsMagick or ImageMagick, how do I replace transparency with a fill colour?
Using GraphicsMagick, it's fairly easy to replace one colour with transparency...
gm convert -transparent magenta src.png dst.png
Unfortunately, I can't figure out a simple way to do the exact ...
4
votes
2answers
1k views
How can I deskew and crop PDFs made from scanned pages *automatically*? [duplicate]
Possible Duplicate:
Which free software can I use to deskew scanned images
I have several PDFs made up of book pages' scans. The scans are made from two pages at a time and some of these ...
4
votes
1answer
308 views
Parallel processing slower than sequential?
EDIT: For anyone who stumbles upon this in the future:
Imagemagick uses a MP library. It's faster to use available cores if they're around, but if you have parallel jobs, it's unhelpful.
Do one of ...
4
votes
2answers
282 views
Automating the choice between JPEG and PNG with a script
Choosing the right format to save your images in is crucial for preserving image quality and reducing artifacts. Different formats follow different compression methods and come with their own set of ...
4
votes
1answer
437 views
Thumbnail generation with imagemagick doesn't render the correct colors
Generating thumbnails of PDFs with imagemagick sometimes renders incorrect colors. We're using an old version of imagemagick (6.5.7-8, that's the version installed on the heroku servers). Here is the ...
4
votes
0answers
141 views
Tile animated gifs
Is there some way to use imagemagic / montage to tile looped animated gifs (intermixed with nonanimated ones)?
That is, I want to concatenate the animations in space, not in time. I realize that the ...
3
votes
5answers
1k views
Is there a server-side video manipulation software?
I'm looking for a hosted or self-hosted solution that will allow me to manipulate video files that are uploaded to a server by an end-user.
Does anyone know of any solutions - open source or ...
3
votes
3answers
2k views
How do I change the canvas size of a PNG with ImageMagick (GraphicsMagick)? (How to pad with transparency?)
Alternatively: How do I take a non-square PNG and "fill out" the "rest" of the image with transparency so that the resulting square image has the original image centered in the square?
ULTIMATELY, ...
3
votes
3answers
3k views
Bulk convert PNG-24 to PNG-8 files with best quality
Can anybody recommend a good method of bulk converting a large amount of PNG-24 files to PNG-8 with as little loss of quality as possible and maintaining transparency?
I've tried ImageMagick but the ...
3
votes
2answers
87 views
ImageMagick Convert: How to produce sharp resized PNG files from SVG files?
I am using this command to generate a sharp 512px wide version of an SVG file that I have:
convert -geometry 256 pinterest.svg pinterest.png
This is the source file:
<?xml version="1.0" ...
3
votes
2answers
418 views
Why does Imagemagick convert make the first page of output PDFs too large?
When I run
convert *.jpg output.pdf
the output looks like this:
Why is the first page bigger then the others in the PDF? The original JPEGs were all the same size!
3
votes
2answers
729 views
PDF => raster, is it possible to adapt the sampling resolution to the input page size?
I am using convert (Imagemagick component, delegating to Ghostscript in background) to transform the first page of PDF files to images.
Usually, convert -density 200 file.pdf[0] first_page.png will ...
3
votes
0answers
205 views
Get crisp, clear thumbnails from MP4 with FFmpeg / ImageMagick
My ultimate goal is to get meaningful snapshots from videos that are either 30 min or 1 hour long. "Meaningful" is a bit ambitious, so I have simplified my requirements.
The image should be crisp - ...
3
votes
1answer
278 views
Building ImageMagick on OSX Lion and can't link libpng
I am trying to build ImageMagick 6.8.0-5 on OSX Lion with support for libpng. I am just using the standard ./configure make make install procedure.
I succeed in compiling when I do not reference ...
3
votes
1answer
758 views
Linux: concatenate several images into a PDF file with several images per page
I know that ImageMagick's convert program can be used as follows to convert a collection of images -- say, in PNG format -- to a PDF file:
convert *png output.pdf
The problem with this is that each ...
2
votes
5answers
2k views
Sort and rename images by date in EXIF info
I have a mess in my photos folder; I want to sort them according to date in EXIF information and rename according to the date (like 001.jpg, 002.jpg and so on).
How can I do this in Linux? I have ...
2
votes
2answers
217 views
Is it safe to use ImageMagick on user images?
I've heard there may be security concerns when using ImageMagick on arbitrary user-provided images. For example, the link below gives evidence that there used to be some buffer overflow exploits. ...
2
votes
1answer
88 views
Use imagemagic to put several JPG on one page
I have a folder full of jpg files. When I use the following command,
convert *.jpg assembly.pdf
I get a pdf file with one image per page of the pdf. I would like to put 9 images on each page. Is ...
2
votes
2answers
2k views
Get the number of tiffs in a multi-tiff with command line ImageMagick?
Is there a way to get the number of tiffs in a multi-tiff with a command line utility in ImageMagick?
What I want to to is to extract (split) the multi-tiff into single files. However if the tiff ...
2
votes
2answers
1k views
Cannot run 'display' after ImageMagick install on Ubuntu
I'm trying to install ImageMagick to my Ubuntu box. I've run the following command:
sudo aptitude install imagemagick
Now whenever I try to run 'display' from the command line, I get an error ...
2
votes
1answer
294 views
How can I remove “ImageMagick” completely?
I think I accidently did install 2 ImageMagicks to my CentOS 5.8 before.
Version 6.2.8 was removed by
yum erase ImageMagick
However, it still shows this when I typed $convert -version
Version: ...
2
votes
2answers
116 views
How to identify the format of images in a pdf?
I have received a number of pdf files with images in them. The original images have been lost, so I need to extract them. I have Adobe Acrobat Pro, so I extracted them using Advanced > Document ...
2
votes
2answers
399 views
Can I use ImageMagick to remove the password from a PDF?
If I have a PDF and I have its password, I can merely send it to a PDF printer to get a new PDF with the same contents and no password. The process is not exactly painless though (Ubuntu's inbuilt PDF ...
2
votes
3answers
2k views
Taking a proper screen shot with GNOME-Shell non-disruptively
Running Fedora 15 (moving to 16 soon) - 2.6.40.6-0.fc15.x86_64
I would like to take a screen shot every few seconds - something like:
$ while true; do import -w root png:$(date +%F_%R:%S).png; sleep ...
2
votes
2answers
2k views
What tool can be used to blur images?
Preferably something in paint, or some other built in tool, and definitely free. Does not need to be fancy, just what amounts to smudging the text in an image.
2
votes
1answer
42 views
convert image at command line to console stream
I'm looking for something like ImageMagick's "convert" but that outputs to the console.
The obvious answer is "create a temp file and cat that" but I'd prefer not to have to go to the trouble.
Are ...
2
votes
2answers
529 views
How to insert white space with imagemagick?
What parameters does "convert" (?) need to get this OUTPUT from this INPUT?
INPUT:
OUTPUT:
2
votes
1answer
501 views
How to render some text with given font file?
How to just render some text with the given font? Expecting something like:
echo "The slow cyan snail creeps under the eager cat" | render_text --font ./qqq.ttf --scale=18 -o text.png
I expect this ...
2
votes
2answers
2k views
Resizing and cropping images to 6x4 to width of 1024
I have a mixed set of images, each one having a slightly different resolution with a slightly different aspect ratio from the other images.
I have tried using commands like:
convert -resize
and:
...
2
votes
1answer
82 views
imagemagick image conversion piped in avconv fails
I am trying to write a script that should take all sort of images (format, size...) and create a video with avconv. I've managed to make it work with a series of jpg (all the same size though) and I'm ...
2
votes
1answer
767 views
Apple Automator “New PDF from Images” maintaining same filename
I will potentially have 26k of old legacy PICT images to transfer first to PDF for migration. I am using Apple Automator and also the "Dispense Items Incrementally" to loop through it. However, I ...
2
votes
1answer
337 views
Keep alpha transparency in indexed PNG from Fireworks when batch resizing using convert (ImageMagick)
I have a special case where I'm using alpha transparency in indexed PNGs from Fireworks to keep the file size of PNG's in an iOS game down. (That is, indexed colors like an 8bit PNG but alpha ...
2
votes
1answer
345 views
GraphicsMagick error reading PNG file
When trying to read a large PNG file, GraphicsMagick command
gm convert pallaso1.png pallars-sobira.jpg
just displays this error
c:\progs\GraphicsMagick\gm convert: Read Exception (PALLASO1.PNG).
...
2
votes
1answer
237 views
how to change the color that's used for transparency automatically, or programmatically?
For every picture (e.g. bmp, png), a transparent point actually does have a color
The transparency is either
defined by alpha channel mask (e.g. in PNG)
or one of the colors is defined as ...