Questions tagged [imagemagick]

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.

Filter by
Sorted by
Tagged with
4
votes
1answer
3k views

ImageMagick: How to thicken lines

I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker. Examples given from ...
2
votes
2answers
1k views

Resize image in a script using Imagemagick

I'd like to create a bash script to resize images up to 800px keeping proportion... My code doesn't work in bash, but it works using identify with a single image : #!/bin/bash for file in ./**/...
3
votes
1answer
1k views

how to shrink all images, jpg in a directory to another directory using imagemagick

I read Using mogrify (imagemagick) to batch convert all my files (with params) and it seems my query/path is very similar, except the fact that all the pictures in my directory have same Width and ...
1
vote
0answers
68 views

ImageMagick + ruTorrent-stats (Github repo)

I am trying to combine information I found here on the Unix & Linux Stack with I Wim Leers' rutorrent-stats I have some experience with coding simple websites and while I am by no means a ...
5
votes
3answers
24k views

How to install opencl in CentOS 7 using yum?

I need to install opencl in CentOS 7 nvidia. I already installed cuda. But when I try to install ImageMagick with OpenCL, it is showing CL/cl.h not found. But there are files in /usr/local/cuda-7.5/...
2
votes
2answers
342 views

Installed ImageMagick7-7.0.1.5 on FreeBSD 10.3 but there is no `import` command available after installation

After running $ sudo pkg install ImageMagick7-7.0.1.5 on FreeBSD 10.3, noticed that what I needed is not installed: import Am I missing something?
0
votes
2answers
817 views

How do I grab image dimensions using ImageMagick cli?

I am having issues with the part of the following script where it takes the inputted image and checks its dimensions. If it's not a certain dimension then it resizes the image. My issue is what would ...
1
vote
0answers
990 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, ...
3
votes
2answers
105 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 ...
3
votes
1answer
2k 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
2answers
407 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 ...
3
votes
1answer
589 views

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

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 libjpeg-dev I have tried: ...
3
votes
1answer
2k 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 ...
2
votes
1answer
137 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
85 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
3answers
1k 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 ...
4
votes
4answers
566 views

Programmatically 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 ...
6
votes
1answer
4k 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
354 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 ...
1
vote
1answer
2k 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
3answers
1k 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
790 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 ...
1
vote
1answer
296 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
769 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
405 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 ...
9
votes
1answer
8k 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 ...
0
votes
1answer
150 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, ...
1
vote
0answers
594 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 ...
6
votes
1answer
3k 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
4k 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: libmagickcore-6....
2
votes
1answer
859 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
1k views

ImageMagick convert grayscale to alpha, colorize, overlay

I have a 24-bit RGB (not RGBA) grayscale image representing a barcode, which I need to process as follows from the command line: Add alpha channel Convert any of the color channels to alpha (doesn't ...
2
votes
1answer
1k 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 ...
2
votes
0answers
142 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 ...
3
votes
1answer
4k 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 ...
19
votes
3answers
18k 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 ...
0
votes
0answers
734 views

Metadata preservation when modifying images with ImageMagic

I want to resize, convert or resize + convert images in JPEG, PNG and TIFF in each direction: jpg → tiff, tiff → png, etc. And I want to use -flatten as well. What does ImageMagick do with the ...
3
votes
1answer
1k views

Create an ARGB struct for C header from a PNG

I need to update a logo bitmap to an updated logo. The existing code uses a C header which is loaded via XChangeProperty. I have looked into imagemagick and the Gimp in order to convert the updated ...
1
vote
1answer
522 views

Convert horizontal picture to vertical using imagemagick, filling empty space around with black

I have a horizontal image and i want to create a vertical copy of it for a specific resolution, filling the empty space around it with black. Can this be done with imagemagick and how?
10
votes
2answers
7k views

add filename as text in the corner of an image file

I have a bunch of jpeg images. Say 001abcd.jpg, 002abcd.jpg, and so on. I want to capture the filename and add it as a text in the image itself in one corner. So the result would be, for example, the ...
2
votes
1answer
517 views

convert -composite freezes?

I installed ImageMagick with pacman on Arch Linux. Now I try to compose two images like this: convert \( -size 1x1 xc:black \) \( -size 1x1 xc:black \) -composite out.png but it freezes at 100% CPU ...
1
vote
1answer
417 views

Creating multiple pngs with ImageMagick causes slow desktop

I am running Linux Mint 17, Cinnamon 2.4.8 Hello, I am using ImageMagick to create large 500+ png images. This causes Cinnamon to go very slow. I would understand if Cinnamon is slow WHILE I am ...
1
vote
1answer
5k views

How to use convert command with bash to resize all images in a given directory?

I want to resize all PNG files in ~/somefolder/ whose filenames are NOT started with tn_ to 50% of its original size and rename the output file with a tn_ as its prefix and its original name. I know ...
0
votes
1answer
488 views

Imagemagick mogrify with shadow geometry

How can I specify the size of a shadow with imagemagick? This command works: montage foo.jpg bar.jpg foobar.jpg -background lightgray -geometry 1031x1642+57+57 -shadow -monitor -tile 3x1 out.png ...
3
votes
1answer
804 views

Rotate image if width is greater than a value (i.e in pixels)

I was trying to rotate few hundred images which have 7000px height in 1000+ images how to rotate them from bash.
1
vote
1answer
178 views

/scripts/installimagemagick is now deprecated

I am trying to install Redmine With SVN following this article. But when i run /scripts/checkimagemagick this command -bash: /scripts/checkimagemagick: No such file or directory and when i run /...
2
votes
1answer
787 views

How to extract comment from ppm file?

I have ppm file X.ppm with comment : xxd X.ppm|head -10 0000000: 5036 0a23 206d 6967 6874 796d 616e 6465 P6.# mightymande 0000010: 6c20 2d32 2e38 3034 3132 3232 3037 3833 l -2.80412220783 0000020: ...
9
votes
8answers
3k views

Find duplicate PDF files by content

Some journals generate a different PDF for each download. APS for example stores time and the IP address in the PDF. Or there is a paper version with hyper links and one with text references. How ...
4
votes
1answer
193 views

Avoid bloating file size when removing OCRed text from a pdf file?

I use pdfimages and convert recommended by Anthon to remove the OCRed text of a pdf file, and the size of the pdf file changes from 29MB to 373MB. My first step is split the pdf file into a pbm file ...
2
votes
1answer
608 views

ImageMagick vs GraphicMagick: How to move image

So, I have a bunch of files that I use as the basis for my wallpapers. Using ImageMagick, I can convert then using: convert \ -resize '1920x1080>' \ -extent 1920x1080 \ -background '#...