ImageMagick is an open source image editing software suite for displaying, converting, and editing raster image files. It supports read/write for more than 100 image file formats.

learn more… | top users | synonyms

0
votes
0answers
19 views

getting wrong order of files with ImageMagick and *.png [duplicate]

I am using ImageMagick to concatenate files which I have named 1.png to 50.png. However the files are arranged in the wrong order going 1.png, 11.png, 12.png ... instead of 1.png,2.png ... It must ...
0
votes
0answers
30 views

How do I use imagemagik with URL locations?

The command below can be used to genereate a gif animation from a bunch of files stored locally: convert -delay 10 -loop 0 *.png animation.gif Is there a way to tell convert to wget the images from ...
3
votes
2answers
36 views

Collate image list with name

How to create a collation of images in the format: image_name_1 [IMAGE#1] image_name_2 [IMAGE#2] image_name_3 [IMAGE#3] ... Using Imagemagick I can say something like: montage -label '%f' -mode ...
7
votes
5answers
10k views

How to rotate all images in a directory with imagemagick?

I want to rotate all the images in a directory that match a pattern. So far I have: for file in `ls /tmp/p/DSC*.JPG`; do convert $file -rotate 90 file+'_rotated'.JPG done but that gives no ...
0
votes
0answers
38 views

Using mogrify (imagemagick) to batch convert all my files (with params)

we are new to mogrify and I just read all I could find but somehow I am not succeeding to do the following. take a input path and process all files also in subdirectories trim all resize all image, ...
1
vote
0answers
16 views

How can I remove the embedded preview in an EPS file without destroying all metadata?

I have several EPS files data exported from Adobe Illustrator, which apparently embeds a TIFF preview so that the EPS file is previewable. This is undesired, because I use these files in XeLaTeX, ...
0
votes
0answers
7 views

Mogrify/imagemagick flatten + trim in 1 command nog working when processing JPG and TIFF

We are processing 500 images tiff and jpg using this command mogrify -path "PATH_TO\DONE" -trim -flatten -define jpeg:extent=500kb -format jpg -resize "1200x1200>" *.* It should open all images, ...
1
vote
1answer
39 views

Find All images file size and width in directory

I'm trying to find all .png .jpg and .gif files in my directory. I'm getting the file sizes properly but unable to get image width (I'm using imagemagick) in log file. Script code #!/bin/bash for d ...
2
votes
1answer
23 views

Silhouette from an image

How can I create silhouette from an image in linux using the terminal? By creating silhouette I mean - how do I turn the RGB components values of an RGBA image to #000000, while preserving the alpha ...
1
vote
2answers
266 views

imagemagick display: different text in font preview

The awesome display command from imagemagick allows me to preview fonts: display ~/.fonts/font.ttf However, the text is always the same ('That which does not destroy me, only makes me stronger'). ...
2
votes
0answers
24 views

Can not seem to get the jp2 delegate to work in ImageMagick on Ubuntu 15.10

As the title says, I have tried to install the library on both 14.04 and 15.10. Every time I type in convert -version the delegates do not contain jp2000. I have installed libopenjpeg-dev and ...
3
votes
1answer
45 views

mkfifo pipes, file descriptors and ImageMagick (convert)

I'm in trouble using named pipes (i.e. created with mkfifo) and file descriptors to redirect outputs and grab inputs to/from them within ImageMagick (convert). Basically, with the following bash code ...
19
votes
7answers
42k views

How to convert TXT to PDF?

I want to convert .txt files to .pdf. I'm using this: ls | while read ONELINE; do convert -density 400 "$ONELINE" "$(echo "$ONELINE" | sed 's/.txt/.pdf/g')"; done But this produces one "error" -- ...
4
votes
4answers
53 views

Programatically determine “uniformity” of image

I'm attempting to write a script which thumbnails our many thousands of assets. The assets use Flash for the most part, and I'm capturing them via chromium-browser on the command line. I pretty much ...
3
votes
0answers
21 views

How to resize images to fit all content on minimal canvas?

I'm trying to quickly check for differences between separate iterations of a web site using ImageMagick's compare. But it refuses to compare images of different size, and doesn't seem to have an ...
1
vote
0answers
35 views

How to preserve clearness while converting jpg to pdf file?

I would like convert a jpg file (a photo taken of two pages of a book) to a pdf file, with the goal of making the pdf file look like pages of a regular ebook file in terms of page size and ...
1
vote
1answer
32 views

Multiple images on root window with ImageMagick

I don't run a desktop environment, but instead use a bare window manager (StumpWM). Thus, my usual method for setting a desktop background is to run display -window root <image file> from a WM ...
0
votes
0answers
23 views

How to create a gamma cross-fade of two pictures using ImageMagick?

I want to make a gamma composite image, as is common with making cross-fades between two video tracks. The composite frames of the cross-fade are made by cross-fading the gamma values of one picture ...
2
votes
3answers
2k views

How to mount a .jpg centered into a .pdf (using defined page size and borders)?

I'm looking to convert a .jpg into a .pdf, so that the .jpg is positioned at a certain location: centered on (say) an A4 page, with a minimum border of 30 pixels all around between image and page ...
1
vote
1answer
35 views

Stop ImageMagick from rotating image on append

I took two photos with my phone, one horizontal and one vertical, and they show up fine in Eye of Gnome. When I try to glue them top-to-bottom with ImageMagick's convert: $ convert img1.jpg img2.jpg ...
1
vote
1answer
27 views

How to use ImageMagick's convert to rescale an image, adding letterboxing to produce a fixed size result?

I have some arbitrarily-sized images for which I want to produce fixed-size 800x600 thumbnails, which keep the original image ratio and add white letterboxing to make up the rest of the space. I'd ...
4
votes
1answer
2k views

Resizing and cropping images to an aspect ratio of 6x4 with width of 1024 pixels

I have a mixed set of images, each one has a slightly different resolution with a slightly different aspect ratio from other images. I have tried using commands like convert -resize and convert ...
0
votes
1answer
185 views

How To Install and Configure ImageMagick for PHP and Wordpres on Amazon Linux AMI

I've installed a fresh Wordpress site on my Amazon Linux AMI following the setup instructions listed on the EC2 Tutorials section i.e. "Hosting a WordPress Blog with Amazon Linux". I'm also using the ...
5
votes
2answers
271 views

Create the same PNG with ImageMagick 2 times: Binaries differ

I create two images that should be identical, but their binaries are different: $ convert -size 1x1 xc:white out1/w.png $ sleep 1 $ convert -size 1x1 xc:white out2/w.png $ diff out1/w.png out2/w.png ...
2
votes
1answer
118 views

Cropping images using ImageMagick results in all output files (TIF) of same size?

I am scanning a rare old book (cookbook) for archiving using my Canon LiDE 110. The scans are .TIF files, and I want to batch crop them for uniformity, et cetera. This is how I am doing the batch ...
0
votes
0answers
45 views

remove black bars have watermark by imagemagick

I have a vary large number of images with watermark some of them have black bars and some not. and i want remove the black bar ,,i was use -trim but imagemagick cannot identify the black bars due the ...
1
vote
1answer
47 views

bash script to bulk resize using Imagemagick

I need to convert a very large number of images JPEGs. those images some are 720px × 480px, and some 300x400 and some 2000x1400 and some are 1000x1000 etc.. I only need to resize those images to ...
1
vote
3answers
50 views

script not running as expected when scheduled as a cronjob

I'm trying to write a script that will identify corrupt jpg images using imagemagicks identify command. The script will run the command, grep the output for the word "Corrupt", move it to a corrupt ...
0
votes
1answer
58 views

Imagemagick having trouble escaping shell variables

I have an imagemagick command that is having trouble with the $quote$arcangle and $halfdimension$quote concatenated shell variables I'm passing as strings. Here's the transcript: $> echo convert ...
3
votes
1answer
101 views

overlay an image

I have two photos ( 1.jpg and 2.jpg) I want to make photo 2.jpg as a background and photo 1.jpg red colored overlay and I want the output to be like photo 3.jpg as follow ( I want to put photo number ...
30
votes
10answers
63k views

Converting multiple image files from JPEG to PDF format

I want to convert some files from jpeg to pdf. I am using following command. $ convert image1.jpg image1.pdf But I have 100 images. How should I convert all of them to corresponding pdfs? I ...
0
votes
1answer
30 views

Imagemagick import screenshot in Debian of a launched app

I'd like to launch Iceweasel and then take a screenshot. When I simply try to wait and take it, it works fine sleep 10;import -window root root/scr/scr.png however when I first launch the browser, ...
30
votes
5answers
44k views

Creating a GIF animation from PNG files

Is there a tool to create a gif animation from a set of png files? I tried the convert command from the ImageMagick suite, but this doesn't always succeed. Also, I have several issues with this: I ...
26
votes
6answers
32k views

convert images to pdf: How to make PDF Pages same size

I did something like convert -page A4 -compress A4 *.png CH00.pdf But the 1st page is much larger than the subsequent pages. This happens even though the image dimensions are similar. These images ...
2
votes
2answers
834 views

Set default pdf reader

When I install shutter to take screenshots, imagemagick sets itself as default PDF-reader and I am unable to change it. I would like to have evince as default PDF-reader. I have tried right click ...
1
vote
0answers
88 views

Why does Imagemagick's convert change TIFF metadata?

I've got a TIFF file with a certain set of tags. When I convert this file to fix the offset of ICC metadata (not word-aligned), I get a whole different set of tags. Why does this happen and how can I ...
3
votes
1answer
58 views

How to split images using ImageMagick?

I have an image which contains multiple images in it. I want to split the image into multiple image files, one file per image. How do I do this using ImageMagick? I have attached a sample image file. ...
1
vote
2answers
526 views

The following packages have unmet dependencies

Every time I try to use apt-get install or remove or purge on my Debian, I have this error pop up: The following packages have unmet dependencies: libimage-magick-q16-perl : Depends: ...
0
votes
0answers
65 views

Resizing image with ImageMagick and Ruby on Rails

I have been trying to use Imagemagick to resize images uploaded by a user as a square. Currently, I am using the ! like so - 640x640! This works fine if the image I feed it is a resolution of ...
1
vote
1answer
87 views

is there a difference between convert and convert-im6 and if yes, what?

I checked out changelog.gz, changelog.Debian.gz as well as NEWS.Debian.gz but could not find what the difference is between convert and convert-im6 ? I did see that both are genuine binaries and not ...
1
vote
1answer
257 views

ImageMagick convert grayscale to alpha, colorize, overlay

I'm a total noob with ImageMagick, but I have extensive experience with Photoshop – I know this should be a breeze for an ImageMagick veteran, but I'm pulling hairs here. I have a 24-bit RGB (not ...
27
votes
5answers
45k views

How can I convert a PNG to a PDF in high quality so it's not blurry or fuzzy?

There are a lot of questions out there about how to convert a PDF file to a PNG image, but I'm looking to take a nice sharp PNG file and just basically wrap it or embed it in a PDF file without having ...
2
votes
1answer
147 views

Recursively execute imagemagick composite command in directory tree

I have a large directory tree with many sub-folders and lots of images within each one. I found a script that applies watermark to all images within a directory, in-place, overwriting the original ...
0
votes
0answers
44 views

imagemagick: compositing images with fractional X/Y offsets

Using a one-line imagemagick command, how can the offset of a destination image be defined in relation to the size of the source image? The following command superimposes two images with absolute ...
0
votes
0answers
49 views

error in script that calls convert command

I am pretty new to linux and have encountered an issue I feel confused about. I need to combine a list of images, located in different folder, into one single jpg. #!/bin/sh # parameter $1 is the ...
9
votes
4answers
13k views

How to convert a color pdf to black-white?

I'd like to transform a pdf with some coloured text and images in another pdf with only black&white, in order to reduce its dimensions. Moreover, I would like to keep the text as text, without ...
1
vote
0answers
36 views

How to cut a really large raster image into smaller chunks?

I have a large poster as a pdf-file. I need to create a raster image from it (for instance because there seems to be no pdf viewer which allows me to zoom sufficiently to see the contents). So I ...
14
votes
4answers
8k views

Command line convert webp to jpg?

I'm using ubuntu 12.04. I've installed libwebp2 & libwebp-dev So far, no example found on the net of converting webp to jpg. Some webp files can easily converted by using imagemagick with ...
6
votes
3answers
2k views

Convert every pdf in the current directory to png

I want to write a bash script to convert every .pdf file in the current directory into a .png file. For example: $ls . a.pdf b.pdf $./pdf2png.sh Converting pdfs to pngs a.pdf -> a.png b.pdf -> ...
2
votes
1answer
311 views

Alpha removal with ImageMagick is bad but only with a white background

I'm getting surprising (to me) variations in antialiasing quality when converting a PDF (with black text on white only) to a PNG and removing transparency with ImageMagick (version 6.7.7.10 from ...