Questions tagged [imagemagick]

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

Filter by
Sorted by
Tagged with
4 votes
1 answer
179 views

How do I produce a PDF from imagemagick with Fast Web View enabled?

I collate a bunch of images into a single PDF using ImageMagick. While this works properly, when I open the PDF on the browser and go to properties, it's showing that Fast Web View is not enabled for ...
2 votes
0 answers
60 views

How can I use a widely-available cross-platform command line program to render a string containing emoji [closed]

I would like to use a widely-available command line program, the lighter-weight the better, to render a string containing emoji into a raster image. The rules are: must work on a minimum of OS X and ...
  • 121
2 votes
1 answer
56 views

Modify gamma of a PNG image without modifying pixels

How to do the following "conversion"? Input: A PNG image which claims it is encoded in sRGB, but in-fact is linear Output: A PNG image with the same pixel values the input, but instead ...
0 votes
1 answer
39 views

Combining 2 ImageMagick commands be into one script

What I have is a layer of black text, a layer of grey text, and a layer of colorized text, each letter is a different color, and I want to offset the grey layer 3,3 and the colorized layer 6,6. So I ...
0 votes
0 answers
103 views

How to open a raw image?

I've installed Gimp via brew on my Mac. This is the error when trying to open a raw image: I've installed ufraw (also via brew). That is supposed to integrate with Gimp, but I didn't notice any ...
0 votes
0 answers
14 views

Specifying the name and extension with Imagemagick mogrify

I have a number of png files that I would like to tile crop. The resulting png files should have a 256 color palatte and be in the format of name_##.png (image_01.png, image_02.png, etc) Following the ...
2 votes
1 answer
32 views

How would I transform a page in-place in a PDF programmatically, e.g. with imagemagick/convert

I have a multi-page PDF file (7 pages), in which 1 page (page 6) must go through 2 transformations (I think): It must be cropped. It must be scaled. And then it must be saved again as PDF, ...
  • 123
0 votes
1 answer
21 views

Controlling imagemagick output filenames with "printf"-style formatting directives

According to stuff I've read, I should be able to do: convert -density 200 foo.pdf -quality 90 'output-%3d.jpg' to get a set of JPG files with names like "output-001.jpg", "output-002....
  • 871
0 votes
1 answer
63 views

Reported PPI of jpeg image conflicts between Imagemagick & GIMP

I have a jpeg image and I wish to find out the image resolution in PPI before sending it to someone. I open it in GIMP 2 (on Ubuntu Studio 20.04) and look at the image properties. It reports a ...
  • 1
0 votes
1 answer
473 views

Convert PPM to PNG

I recently finished the raytracing tutorial "Ray Tracing in One Weekend", which outputs to PPM. I'm trying to convert to PNG to share my results, but all the solutions I've tried have thrown ...
  • 3
0 votes
0 answers
65 views

Merge the multipage tiff in subfolder to another output folder as single image

Iam trying to merge the multipage tiff in subfolder to another output folder as single image. the base command is convert f:\input*.tif f:\output\image1.tif My question : Iam getting no output. What ...
0 votes
0 answers
14 views

How to slim the thick fonts in Imagemagik

I was trying to slim down the thick fontsthick image to "3033 Elgin Avenue" something as keyed here. Any suggestion.
0 votes
0 answers
61 views

textcleaner not found error on powershell

Iam trying to run the textcleaner script on windows powershell(bash) textcleaner.sh -g -e normalize -f 50 -o 10 -s 10 "F:\Testing\input\input.tif" "F:\Testing\output\input.tif" I ...
0 votes
0 answers
82 views

How to contain image size depending on landscape or portrait using imagemagick?

I want to mogrify image so that the maximum size it can have is 2048x1024 in landscape and 1024x2048 in portrait. Is this possible with imagemagick? It will process a folder full of images with ...
1 vote
1 answer
1k views

Converting JPEG/PNG to TIFF with Imagemagick format results in a file size about 6.5 times bigger

I am told to use TIFF format for my raster images (originally I have both JPEG and PNG images) according to the editorial office of the journal I am submitting a research paper to. I tried ImageMagick ...
1 vote
0 answers
41 views

ImageMagick: target-size is ignored?

Original image is 3.7M, this command produces file size of 2.7M, but I want 2M: convert in.jpg -define webp:target-size=200000 out.webp Also tried target-size=2MB. Related documentation: https://...
0 votes
0 answers
198 views

How to generate a C array out of an image to be viewed on an eInk display?

I'm trying to draw an image on a 480x280 2-color ePaper display from Waveshare. I control the display using a RaspberryPi Pico. First I make sure that the image is 480x280. Then I convert it to a byte ...
0 votes
2 answers
871 views

How do I batch recursive imagemagick JPGs into PNG in a folder?

I saw these posts: mogrify - how do you recurse through subfolders in Windows Using imagemagick to identify all files in multiple subfolders https://stackoverflow.com/questions/30414346/batch-command-...
1 vote
1 answer
73 views

Split image on printable sheet

I have a logo in png on which I specified the size in centimeter ( 40x45 cm). I need to split that images on two A4 sheet to be able to print it. I tried to use convert but I have to specified the ...
  • 13
0 votes
1 answer
601 views

How to extract pages 3, 4, 5 from a PDF from Windows command line?

Note: I have already found solutions for Linux (see How to extract all pages of one big pdf file?) or solutions with Python, or solutions with freeware GUI tools. How do I extract specific pages from ...
  • 1,478
0 votes
0 answers
1k views

Batch converting PNG images to JPG using ImageMagick's Mogrify

I need to batch convert PNG files to JPG at a quality of 90% but also keep the resolution at 72dpi. I came up with this command: mogrify -format jpg -quality 90 -density 72x72 *.png or should I use?: ...
1 vote
1 answer
63 views

ImageMagick display WxH+x+y window

In ImageMagick's display, if I press 'c' and start to drag a crop frame, a small box appears at top left showing WxH+x+y for the crop frame. Is there any way that data can be accessed programmatically ...
1 vote
0 answers
465 views

ffmpeg - fit multiple lines of text (having different fonts) with auto line wrap and auto font size?

Trying to keep this question to a minimum as in terms of info. Sorry if it's too long and thank you for reading it! I'm trying to make these texts fit (they have different fonts and font sizes) to the ...
0 votes
1 answer
90 views

Can I encode a PNG image losslessly to another format and decode it back into an identical file?

I am archiving roughly 150gb of PNG assets. In an effort to increase the compression ratio of the images, I am trying out FLIF (Free Lossless Image Format). This provides an excellent compression ...
  • 139
0 votes
1 answer
22 views

image-magic: combining images to the table

I use convert utility of image-magic to combine several images producing one big summary chart, with all initial images joinded in a single row: convert "${vizu}"/img_*.png +append "${...
  • 147
0 votes
1 answer
222 views

Stitching TIF tiles into large image

I have a list of 25 TIF images (map tiles), each around 400 MiB in size (each small rectangle here): I need to stitch them into one single huge TIF. Is there a command under Linux that can do this? I ...
2 votes
2 answers
224 views

Embed image in fixed canvas with Image Magick

I'm looking for a command in Image Magick to take an arbitrary image (of any aspect ratio), and embed it in an image of a fixed size, growing/shrinking the source image as necessary to fit. For ...
1 vote
0 answers
26 views

replace black (and proportionally grey) with fixed colour using imagemagick

I have a pdf/png/jpeg which is black-and-white. I want to make it blue-and-white or red-and-white or something-and-white. There are grey tones and I want them to be handled proportionately. In gimp I ...
  • 2,012
0 votes
1 answer
236 views

Force aspect ratio with Image Magick

I'm looking for a command in Image Magick to force an image into a particular aspect ratio. The result should be the original image with the layer expanded to the correct aspect ratio, with the ...
0 votes
1 answer
88 views

Place one image in a larger field with Image Magick

I'm trying to use Image Magick to do this: take one image, shrink it a bit, and place it in a larger white field (of size 1280x720). For example, with Image1 as the source, the end result should ...
1 vote
2 answers
369 views

ImageMagick "convert" smartphone JPG to fax-quality document

I was advised on Stack Overflow to post here. TL;DR: Can ImageMagick's convert convert smartphone photographs of document pages to a fax-quality PDF file and shrink the file size by several orders of ...
1 vote
1 answer
138 views

Zoom and morph at the same time using ImageMagick

I have two different maps of the same region: one from a distance, the second a close up. The white retangle in the first image represents the border of the second image. I want to apply two effects ...
  • 161
1 vote
0 answers
347 views

Imagemagick file conversion not working?

I am trying to convert a file from .gif to .bmp using this command: convert -coalesce pixels8.gif out.bmp While doing this i get this error: convert-im6.q16: memory allocation failed `pixels8.gif' @ ...
0 votes
1 answer
176 views

how can i output imagemagic image with the name of the containing folder in batch?

FOR /R %%a IN (poster.jpg) DO convert "%%a" -resize 256x256 -background none -gravity center -extent 256x256 "%%~dpna.ico" The current behavior is to grab every poster.jpg file ...
5 votes
5 answers
6k views

How can I convert a JPEG image to a RAW image with a Linux command?

I have a series of JPEG images taken with Canon Powershot to JPEG. How can I convert/transform them to RAW images? Not with a graphical tool, but from the command line! NB : Using raw images to stack ...
  • 107
-2 votes
1 answer
732 views

Having problems merging two images using ImageMagick, the error says that it can't find the images I'm trying to merge

I've tried looking for answers online, but none of the solutions I've found worked. So far I have tried the following three commands; where a and b are the images I want to merge and c is the combined ...
  • 1
1 vote
2 answers
159 views

XSane and ImageMagick automatically installed in my PC

While I was using GIMP, XSane and ImageMagick were automatically installed in my PC? GIMP has probably done it. How did GIMP installed them? GIMP did not even asked my permission. Similarly, few ...
0 votes
1 answer
37 views

Cropping sections of an image and composing it into one image

Suppose I have the following image with three equally-sized rectangles, but different letters And I would like to combine them so that there is only one rectangle with all three rectangles layered on ...
  • 1,139
0 votes
1 answer
185 views

How can the convert command's output be passed/piped instead of saved to a file?

I made a HTML file with images as base64. I started bash-scripting to make a folders images be base64-printed into this html-file. I worked, I share the code: cat html_head.txt > fil.html for i in *...
0 votes
1 answer
323 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 ...
  • 956
0 votes
1 answer
898 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 ...
  • 756
2 votes
1 answer
628 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/...
2 votes
1 answer
460 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 ...
1 vote
2 answers
549 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 ...
  • 165
6 votes
1 answer
6k 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
1 answer
781 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 ...
  • 133
1 vote
1 answer
1k 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
2 answers
680 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 &...
  • 351
1 vote
1 answer
200 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
1 answer
221 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
2 3 4 5
9