Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [imagemagick]

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

0
votes
1answer
16 views

ImageMagick: combine two images with transparency at the border

I have two JPGs one big.jpg and the other small.jpg. I want to extract a region region.jpg of big.jpg of the same size as small.jpg and merge region.jpg and small.jpg into a result.jpg. result.jpg is ...
0
votes
0answers
8 views

How do I convert PDF 2 MTIFF in command line on Mac?

I need to convert some multi-page PDFs in to multi-page TIFFs whithout quality loss. Any idea to do it in a batch on command line on Mac OS Mojave? I tried ImageMagick but seem to be buggy in current ...
0
votes
0answers
25 views

Imagemagick: splitting pdf's pages w/ overlap

Imagemagick's convert allows for splitting a pdf's page to several pages, e.g. convert in.pdf -crop 50%x50% +repage out.pdf makes 2 half-sized pages of the original(s). I want a version of split that ...
0
votes
1answer
45 views

Add a new ImageMagick command in an existing batch file

I have this batch file: for %%f in (*.svg) do ( "C:\Program Files\Inkscape\inkscape.com" ^ -z ^ --export-background-opacity=0 ^ --export-height=256 ^ --export-png="%%~nf_256x256.png" ^ --...
0
votes
0answers
23 views

Run agt-get install imagemagick on raspberry pi using docker file

I am new to docker in rasppberry pi. I have installed docker on my raspi, and I wanted to create a docker image. This docker image when pulled into another raspi with docker should install imagemagick ...
2
votes
3answers
42 views

Script not passing variable information into If, Else, While, or functions

I have a script that was working before I started breaking it apart into smaller pieces. Something I noticed is as I try and use variables the information is not brought in. I have to copy paste that ...
2
votes
1answer
44 views

Script is running from .ps1 physical location not from specified path

I'm working on a script that: Takes an uploaded folder and removes all its folders Dumps all its files into another folder Converts all the files into one single .pdf using ImageMagick Moves that ....
1
vote
0answers
28 views

create image with transparent background with ImageMagick

I am currently working on a script to process assets for a game. I am breaking down old assets and reorganizing them for a new format. The original images have transparent backgrounds already. When I ...
0
votes
0answers
35 views

What is the GraphicsMagick equivalent of ImageMagick's +opaque?

Extracting a specific color (red) from an indexed BMP in ImageMagick goes like this: convert input.bmp +opaque "#FF0000" red.png Trying it with GraphicsMagick fails as it appears to not support +...
0
votes
1answer
49 views

FFmpeg - blur image according to blur map [duplicate]

Is it possible with FFmpeg to blur a video according to blur map like this? Attached a sample. Looking for a way to make specific parts of image blurred. Like ImageMagick's "compose blur", but for ...
0
votes
1answer
36 views

How to keep original name after running command line tool?

I am running imagemagick (CLI tool) to splice an image into 16 equal parts. I am using it like so : convert inputfile.jpg -crop 4x4@ +repage +adjoin -resize 256x256 output_4x4_%03d.jpg I'd like to ...
0
votes
2answers
34 views

How can I create a .prn file from a TIFF?

I have an industrial printer that requires .prn files to print. I'd like to automate generation of these files using software I write. We start with TIFF files, and then we use special software from ...
0
votes
0answers
34 views

Imagemagick: stack images horizontally/vertically and match height/width

For example 1.jpg, 2.jpg which are of dimension axb, cxd. If I run something like convert +append 1.jpg 2.jpg out.jpg. I'd like the out.jpg be (a+c)xb or (a+c)xd. If I run something like convert -...
0
votes
0answers
410 views

Adding a logo to QR Code using ImageMagick

I'm trying to add a logo to a QR Code image. Logo image area must be lower than 12% of the QR code area, in order to be easily used by the consumers. The problem is that the output file must be in ...
0
votes
1answer
39 views

Local policy control in ImageMagick

In ImageMagick, is there any way to control policy locally? Something like ~/.imagemagick/policy.xml. Update: $ dpkg -l imagemagick Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-...
2
votes
2answers
90 views

Generate a PDF from the command line and fill up the page with as many copies of an image as possible?

I’ve been searching around a lot for this but wasn’t able to find a solution. How can I generate a PDF with an arbitrary paper format (say A4) and fill its pages with as many copies of an image as ...
0
votes
0answers
26 views

Can ImageMagick make a bad black and white scan clearer to read?

I'm working with a set of scanned lecture notes. The lecturer wrote the notes in very faint pencil, which scans to a light grey. But they instead scanned in black and white, which turns a light grey ...
0
votes
1answer
75 views

imagemagick - print 2 pdf pages on one A4 sheet [duplicate]

For university, i like to print out my professors scripts. They usually use beamer- or powerpoint presentations throughout the lectures. My goal is to have two presentation sheets on one A4 page. ...
0
votes
2answers
153 views

Convert (compress) JPEG images using mogrify keeping the original files in the same directory

I'm trying to convert(compress) a bunch of JPEG images using imagemagick command mogrify, keeping the original file in the same directory. I'm typing in terminal window : mogrify -quality 25% *.JPEG ...
1
vote
1answer
19 views

Shell scripts: Change page-width of a PDF?

I have a scanned PDF file, where different pages have different page widths due to how the PDF was concatenated from multiple sources. This tends to trip up viewers. Is there some command line tool, ...
1
vote
1answer
78 views

How do I pad an image to a given size using imagemagick?

Say I have a directory of images which is variously 3024×4032 and 4032×3024 pixels, and I want them all resized to 1920×1080. I want that exact output size, but I don't want the images distorted to ...
0
votes
0answers
329 views

How to apt install imagemagick version 7 instead of 6?

I'm trying to install the latest imagemagick on an Ubuntu 17.10 server. Imagemagick version 7 has been out for ages, but to my surprise, this: sudo apt install imagemagick Installs version 6.9.7 ...
1
vote
0answers
105 views

Adding margin to rasterized PDF using ghostscript

I'm cropping and rasterizing some PDFs using ImageMagick. In order to remove some text that I don't need, I want to crop to a smaller box than needed and then readjusting the page size adding some ...
0
votes
0answers
116 views

ImageMagick doesnt work under Debian. Missing libopenexr6 / libIlmImf which is missing from repository

I upgraded to Debian GNU/Linux 9.4 (stretch) , and now ImageMagick doesn't work. convert --version gives this error: convert: error while loading shared libraries: libIlmImf.so.6: cannot open shared ...
0
votes
0answers
26 views

How to scale an SVG relative to its canvas size with the command line

I'm trying to create a pipeline for rendering my vector graphics. I'm basically trying to upscale the vector by 16 times, rasterize it, then downscale to supersample it back down to native resolution, ...
1
vote
1answer
455 views

mogrify - how do you recurse through subfolders in Windows

I thought there was a simple switch in mogrify command options that tells it go through subfolders as well. I didn't find any. On Linux, the "find" command seems to do the trick, how do you do this on ...
0
votes
0answers
31 views

Rescale .svg for composite image via ImageMagick

I've make a couple of batches to automake folder and library icons from the whole twemoji glyphs. Here's my repository on Github. For summarize my problem: Basically this scripts converts, using ...
0
votes
2answers
66 views

ImageMagick displays all images as transparent

Every image I view using display from ImageMagick is at about 50% opacity, including the ImageMagick GUI itself: The KDE window border is not transparent. For the life of me, I cannot find any ...
0
votes
0answers
36 views

Any way to pull multiple images out of a single png, by whitespace / transparency?

I have a file with a bunch of cleanly separated objects, but I need them as separate .pngs or photoshop layers. I've looked into imageMagick and Mogrify's trim options, but they only seem to trim ...
0
votes
2answers
95 views

Sorting files in an numerical order

I have multiple tiff images ordered from 1 to 246. I converted them to a PDF file using imagemagick with convert *.tif out.pdf. However the order of the pages inside the pdf file differs; (for ...
1
vote
0answers
87 views

ImageMagick not setting color space

I'm writing a Python script to batch-process several thousand images. All images are in sRGB, and I'm trying to make a single collage of them. For this I thought I'd first have ImageMagick create an ...
1
vote
2answers
261 views

Why does this Powershell Script create converted images OUTSIDE the Rootfolder?

The following Powershell script is supposed to process all designated images INSIDE the specified Rootfolder. Some of the renamed output images are generated OUTSIDE the Rootfolder. Any Powershell ...
1
vote
2answers
82 views

JPGs or PNGs created by ImageMagick look darker than their 32 bit tiff source

I am working with ImageMagick (Version 7.0.7-36 Q16 x64 2018-05-29) on Windows 7. I am trying to convert a 32 bit tiff to a png. magick.exe convert a_32bit.tif a.png However, the resulting image ...
0
votes
0answers
157 views

ImageMagick error message: convert: non-conforming drawing primitive definition `n25'

I am learning ImageMagick. This error occurs when I run a code copied from https://www.imagemagick.org/Usage/draw convert: non-conforming drawing primitive definition `n25' #Bezier_Primitive ...
0
votes
0answers
16 views

ImageMagic ,change color, change the image more abstract

I am learning ImageMagick, I have a image, want to make it abstract. White the background , and darken the border of the boat. image raw Here is what I tried. convert a.jpeg -fuzz 40% -fill none +...
0
votes
0answers
58 views

How to add timestamp(OSD) in video using ImageMagick command line?

I want to add a timestamp an OSD (on screen display) in Video (recorded in .mp4 format) using the ImageMagick command line. Do I have to apply continuously a video stream/buffer to ImageMagick? What ...
0
votes
1answer
279 views

How can I convert animated gif to animated webp?

On ubunt, I can convert animated .gif files to .webp format using imagemagick's convert 1.gif 1.webp, but then the animation is lost in the destination .web. I'm wondering how to preserver the ...
0
votes
2answers
71 views

How do I reveal “hidden” image noise

Computer images can hide compression noise that's barely noticeable when looking directly at it, but if you tilt your laptop screen you see the noise, eg. the edges around the cans in this image. ...
1
vote
1answer
79 views

How to automatically crop and cut an image into several images using ImageMagick?

How to automatically crop and cut an image into several images using ImageMagick? Hello, Let's say I have an image with four circles of slightly different shape like so: O o o O Is there a way to ...
0
votes
0answers
60 views

Extract Top and Bottom Layer in TIFF Image with Multiple Layers

I need some of your help to extract just the Top and Bottom layer in TIFF File and remove rest of the layers from the TIFF . Can you help me with some Imagemagick/ OpenCV code?
0
votes
0answers
192 views

How to make multipage tiff without re-encoding OR how to set compression for each page independently?

Let's assume the following situation: I have twenty single-page TIFF files which are RGB, but actually contain only two colors (black and white text), and ten single-page TIFF files which are also RGB ...
0
votes
1answer
393 views

split jpg images by given proportions (imagemagick)

I have a bunch of images scanned into jpg format. As you see in the pictures below, the cards are two-sided, when scanning I have placed 6 cards inside the scanner. First card's front side is ...
1
vote
1answer
1k views

imagemagick: how to change image's background color with anti-aliasing

I want to keep the fox only. That is to change the image's white background color to transparent with imagemagick. The anti-aliasing is intractable , the image's edge is of sawtooth. I tried it out....
1
vote
0answers
82 views

Weird border artefacts when taking screenshots with `import`

I take screenshots with Imagemagick's import command such as import /tmp/screen.png. When I drag an area on screen, it shows an outline of the area I'm about to capture, but it's a little finnicky -- ...
1
vote
1answer
981 views

Error in converting a PDF to a PNG in ImageMagick

I use Imagemagick convert to convert pdf file to png as follows: Magick convert -density 300 PointOnLine.pdf -quality 90 PointOnLine.png It gives warning: convert: profile 'icc': 'RGB ': RGB color ...
1
vote
1answer
913 views

Why convert in ImageMagick can not convert pdf to image

I try to convert pdf file to png image in ImageMagick from windows 10 command line as follows: Magick convert a.pdf a.png I get error magick: FailedToExecuteCommand `"gswin32c.exe" -q ... But it ...
2
votes
1answer
583 views

How to replace colors (shape color and background color)?

I want to change the white background to #3D94DB (Hex triplet notation) and change the black lines to white. The image is as following: Here is what I have achieved: convert input.png +level-colors ...
2
votes
1answer
2k views

Best image compression for low bit depth, grayscale images?

I am trying to compress many (up to 2,500) small (300x200 px) grayscale images so the file size is as small as possible. Currently, my bit depth is 4 (16 shades of gray). Image source is surveillance ...
2
votes
1answer
54 views

Why is ImageMagick creating 15 versions of this GIF image?

I’m writing a shell script to determine if these large GIFs could be made smaller in file size for web use by converting them to JPGs. This one GIF is causing a problem for convert. It produces 15 ...
1
vote
2answers
275 views

How to use imageMagick on Chinese Text to Image Handling

I try to use ImageMagick to handle a Chinese character to a image on my MacBook. According to ImageMagick's guide Unicode or UTF8 Format Text, I tried two ways. Code one: convert -background ...