Questions tagged [imagemagick]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Cannot draw with Imagemagick (no images defined)?

I have seen Can't convert PDF into image, because of 'no images defined' error - but that seems related to PDF specifically. Here I try to do something else - just to draw an image, using ...
0
votes
1answer
19 views

Clipping images to a rounded rectangle with ImageMagick

How can I use ImageMagick to convert an image like this to a PNG with a rounded rectangle on a transparent background? Not all images in the set have clean borders, so I prefer to work with a ...
2
votes
1answer
43 views

How to preserve exact colors in Imagemagick svg to png conversion?

Let's take a simple example SVG: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/...
0
votes
0answers
16 views

How do I only apply ImageMagick resize to images that are of certain dimensions in a directory?

I have a folder of images, half are squares and half are landscape shaped. What I'm trying to do is use imagemagick's mogrify -resize, but only on pictures that are wider than they are tall (the ...
1
vote
1answer
54 views

How can I convert an image with odd numbered dimensions to an HEIC image in ImageMagick 7 using libheif 1.8.0?

Short Version: HEIC images need to have even numbered dimensions. In previous versions of ImageMagick installed by Homebrew, libheif 1.7.0 used a kludge to round down image dimensions to even values ...
0
votes
1answer
26 views

Remove jpeg artifacts for scanned texts

I have a scanned PDF of a textbook, but the PDF is aggressively compressed so lots of JPEG artifacts are present and affects its readability. Example: I tried a variety of method to fix it but the ...
0
votes
1answer
227 views

How to overlay multiple images with position and scale in imagemagick?

Given these two images of size 512x512 with transparent background: circle.png inner.png I'd like to overlay these two images, so that they appear centered and shrink the image size down to say ...
1
vote
1answer
39 views

Why does imagemagick's magick command require two arguments for its -write argument?

I've installed ImageMagick v7.0.10-26 on to Windows and I'm running it from a cmd line. I've not installed convert. This example creates two new image files, modified as specified, from the ...
0
votes
1answer
53 views

ImageMagick - How to avoid overwriting existing files with mogrify?

I have these files under ./: a.jpg b.jpg 256/a.jpg I'm running this command to convert files to 256px: mogrify -path ./256/ -resize 256x256 *.jpg But this command always overrides the existing files ...
0
votes
1answer
67 views

Getting “Invalid Parameter - -fuzz” on ImageMagick convert command on Windows 10

Getting this on the latest version of Windows (via GitHub Actions): Command failed: convert.exe "D:\a\stone\stone\build\image.jpg" -fuzz 20% -fill ""#111111"" opaque &...
1
vote
1answer
19 views

ImageMagick: Crop image into separate images of same area but at an interval along axis?

With either imagemagick or ffmpeg is there a way to crop a single image into separate images (put into an output folder) which are of same area (say 2000x500) but at say 20 pixel intervals down the y-...
0
votes
1answer
73 views

Use imagemagick to output rotated text as png

I need to output a png image that has as content a text label rotated 90 degrees, this is the code I'm trying with convert -size 50X100 -draw 'font Baskerville font-size 24 translate 10,...
1
vote
2answers
105 views

ImageMagick with filenames with hyphens: “unrecognized option”

I am trying to use ImageMagick 7.0.10 on Windows 10 v2004 to crop images to a 256×256 square. After cding into the source folder, which has a file called "-s-u-c-k- .png - (hex-a-decimal).png&...
0
votes
0answers
194 views

Feather edge of image in with ImageMagick in 1 step (existing solution in 3 steps)

I am trying to add a feathered edge to a JPG such that it fades to black at the edge of the image. I was able to achieve this in three steps, but have been struggling to combine it into one step. ...
0
votes
1answer
112 views

Loop with Image Magick in batch file

I'm trying to loop through a folder to convert SVG files to PNG files using Image Magick in a batch file: I am wanting to put the new PNG files into a new folder. This is what I have: for /r %%f ...
1
vote
2answers
88 views

Accessing parent and grandparent directory from linux find and passing to xargs

I'm trying to do a batch imagemagick conversion on all tiffs in directories. The structure of the directories looks like: test 123 456 image.tif 256 857 ...
0
votes
0answers
27 views

Imagemagick resize morph - can't set background color

So I'm having problems setting the background color for a resize animation. I'm reading the tutorial from the official Imagemagick docs. Here is the code from the tutorial: convert rose: \( +...
0
votes
0answers
10 views

Slicing a tall image with specific height using ImageMagick including the last part?

I have a tall image that I want to slice into 2048px height chunks. I am doing the following: magick *.png -crop x2048 +repage output/part.png But the problem is the last part of the image does not ...
0
votes
0answers
24 views

Converting Black and White Images to Grayscale

I'm doing a little image project with imagemagick, but I'm fairly new to everything and pretty mediocre at programming. What I'm trying to do is convert all images that are close to black and white (...
0
votes
1answer
125 views

phpinfo() and convert --version show different versions of ImageMagick

I'm running CentOS 7.7 and a few days ago I noticed that my ImageMagick library is missing the ImagickKernel class. So after a lot of research, I got to the conclusion that I'm running an outdated ...
1
vote
1answer
42 views

Can `magick` rename output file the same as input file with additional numbering?

Suppose in a folder, I have dog.jpg and fish.jpg. I want to resize them by 50% and save them with the same name, but with a numerical index. How can I do that using magick (allowing me to pipeline ...
0
votes
0answers
12 views

Overlaying subsections of transparent PNGs in ImageMagick

I have two transparent PNGS, let's say they are 100x100 pixels big and are called a.png and b.png. I'd like to take a.png, then completely replace a subsection of it, let's say an 80x80 pixel area ...
0
votes
0answers
28 views

How do I “fade out to white” on a PNG image in ImageMagick

I have a page of text which I want to fade out on the edges in a sort of square, so the edges of the square fade to white (the text is on a white page). How could I do this with convert? I have been ...
0
votes
0answers
34 views

Color Differences between imagemagick and ffmpeg

I am turning some text created with imagemagick into a video with ffmpeg. I am noticing that sometimes the color in the image and then the same color after being put into a video looks slightly off. ...
1
vote
0answers
37 views

GIMP/Imagemagick: Breaking single images into multiple images

I have pulled the image files from this Gregg Shorthand resource site with the intent of using the shorthand figures in Anki flashcards to complement my study of the system. You will note that the ...
0
votes
0answers
39 views

Poor image quality after merging multiple image file using montage of Imagemagick

I tried to merge multiple JPEG images files into one JPEG using magick montage -border 0 -tile 4x3 *.jpg outputfile.jpg but the image is of very very poor quality. How do I enhance the image ...
0
votes
1answer
55 views

ImageMagick: How to add multiline text superimposed over picture? Text is truncated

Code - convert -size 2000x1000 xc:none -gravity center \ -stroke yellow -pointsize 50 -font Courier-BoldOblique -strokewidth 3 -annotate +100+100 caption:'Conflict is the gadfly of thought. It ...
0
votes
0answers
17 views

Floodfill on all the border pixels

I would to remove all regions starting at the border of the picture by floodfill, is there a way to do this in imagemagick? More specifically I would like a floodfill with a tolerance value (like +-5 ...
0
votes
0answers
7 views

Replace background by a color using a mask

New to image magick, I can't figure out how to replace the background of a picture with a background mask, even after reading the documentation on mask is still not clear to me how to achieve this. ...
0
votes
1answer
46 views

How to stitch 3 JPEG files horizontally to generate a big image that represent a 2 pages big crossed words? [closed]

I have scanned a big crossed words (2 pages in a tv magazine) using my personal scanner. I have now 3 PNG files that I want to combine to generate the original crossed words. After having scanning ...
0
votes
1answer
95 views

How to batch split images using Image Magick

I want split few bmp images using imagemagick commandline on windows. For the new images, the original file name has to be suffixed with partnumber (eg _01 , _02). I tried it in the following way, ...
2
votes
1answer
126 views

i3wm: Screenshot script fails if bound to key

imagemagick's import shell command takes snapshots of ones desktop. Executing import /tmp/foo.png will convert my cursor into a crosshair and will allow me to select a screen area to capture. ...
1
vote
1answer
152 views

Imagemagick batch convert to webp, without making an animation

I want to convert PNGs to webp, for that I use : convert *.png -quality 90% -set filename:basename "%[basename]" "optim/%[filename:basename]".webp Instead of writing one webp per png, I get one webp ...
3
votes
2answers
2k views

How to convert DICOM images to PNG?

I have some DICOM medical imaging files downloaded from Cancer Imaging Archive. I can convert them from DICOM to several other formats, but as you'll see the conversion isn't working as expected in ...
2
votes
1answer
80 views

How can I use ImageMagick to batch resize and use -extent with transparency?

Version: ImageMagick 7.0.8-68 Q16 x64 2019-10-05 Windows 10: 1903 I have hundreds of logos that I need to resize to a standard and then use -extent to pad back out. magick 608000000000051.png -...
2
votes
2answers
140 views

ImageMagick, stack 100 pictures on each other

I have 300 small pictures. Each picture is a black background and a red dot. I want to add all these pictures together so that all dots form a line. I've tried: magick *.jpg images.gif and it works ...
1
vote
0answers
29 views

Batch converting in imagemagic

I am trying to convert files in imagemagic 6.8.9 on linux . I am restoring an old video and have each frame written as a png file . SOme of these files I have to batch convert to give them an offset -...
0
votes
1answer
243 views

Difference between GIMP Indexed color mode and Imagemagick -colors or -remap

My task is to reduce size of scanned text document into .png with acceptable quality loss. My procedure consist of those steps: Raw images are scanned in tif format and processed by ScanTailor (...
1
vote
0answers
275 views

Imagemagick 7.0.8-59 Error Message when Compressing PDF files

I am trying to compress a PDF with this Command: mogrify -compress jpeg -quality 50 path/to/file/* When running the Command I get this error message: Error: ICCbased space /N value does not match ...
1
vote
0answers
496 views

How to compress gif effectively to reduce size?

We use gifs for our blog extensively. We used to embed tenor nano gifs(90px height maintaining aspect ratio, used for GIF previews and shares on mobile) in it. Now we wanted to create our own gifs and ...
1
vote
1answer
409 views

How to configure ImageMagick to work with Alfresco on CentOS7?

I installed Alfresco Community 6.1.2 on CentOS7. The section on ImageMagick just says to install it. I used the command: yum install ImageMagick ImageMagick-devel Now, the alfresco.log shows this ...
2
votes
1answer
122 views

How to run ImageMagick library scripts in Windows with Cygwin

I have reviewed many posts, but I did not find a solution to run ImageMagick scripts in Windows with Cygwin, despite configuring them following this post. It fails with an error FILE ./0004.jpg DOES ...
0
votes
0answers
116 views

animated gif speed, nice in ImageMagick or GraphicsMagic, slow in powerpoint

I have N tiff files. In linux I can do convert -delay 0 -loop 0 *.tiff output.gif In linux, using gm animate *.tif I get a nice smooth rotation at a nice speed. And if I recreate N tiff files to ...
1
vote
1answer
24 views

inlay or composite image into corner of larger image, GraphicsMagic or ImageMagick

(A) I have a rotation of a part so I have 360 tiff files, which I can animate in ImageMagick and also export to an animated gif. This image is 1920x1080, with a black background, there are 360 of ...
1
vote
0answers
949 views

AWS Lambda - node.js - with imagemagick shared lib [closed]

Setup: - AWS Lambda function - Using node.js 8.10 runtime - Using the AWS preinstalled imagemagick lib The error I'm facing when attempting to transform a *.AI file: Error: Command failed: convert: ...
1
vote
0answers
36 views

How to make ImageMagick only replace the file if its size is actually reduced by the conversion?

I need to optimize for size a few thousand jpg files uploaded to my web site by the users. Obviously it's going to be a batch job. My experiments with Google Pagespeed suggestions so far show that ...
0
votes
1answer
2k views

TCPDF ERROR: TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel

I deployed my app and there's a feature to show the document as pdf, but I got this error message: TCPDF ERROR: TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel. ...
1
vote
1answer
116 views

How to pad images with imagemagick?

I need to process a set of identically formatted images to get them to conform with my client's website format. I wanted to use ImageMagick's convert or mogrify instead of ffmpeg but I just cant make ...
2
votes
1answer
155 views

Adding whitespace only at the bottom of an image with ImageMagick (-geometry)

I've been doing something like this to add a text label to an image using ImageMagick montage -label "label" -pointsize 36 img.png -geometry 'x1000>' out.png I use the resize option of -geometry ...
1
vote
0answers
402 views

Trouble installing imagick on Debian Stretch and php 7.2

I have a Debian Stretch machine with php 7.2 on which Joomla is running happily. I need now to add the PHP imagick module to handle images. It doesn't matter how I try to install imagick, it never ...

1
2 3 4 5
9