Skip to main content

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
0 votes
1 answer
23 views

How to concatenate various jpgs pngs and pdf into single pdf leaving their sizes as they where?

I am trying to make a kind of dossier out of various pngs,jpgs and single page pdf images. It has to be a single pdf file, but it doesn't matter that results into something conveniently printable. As ...
wpkzz's user avatar
  • 113
1 vote
2 answers
54 views

How to draw a red vertical line in center over image in terminal bash?

Sometimes, I need to make pixel-perfect HTML markup. This involves exporting a full-page JPG image of the page, importing it into GIMP, drawing a red vertical line in the center, exporting the image, ...
serii 's user avatar
  • 33
1 vote
1 answer
108 views

How to generate full-page QR code from command line?

I'd like to generate a full-page QR code from the command line. The following command sort of accomplishes this: qrencode -o- https://example.net | convert png:- -gravity center -units pixelsperinch -...
user3188445's user avatar
  • 5,359
0 votes
1 answer
143 views

difference between convert -quality and convert -resize and convert -density

I'm trying to reduce file size of a .png in the terminal with Imagemagick convert Does anyone know the difference between convert -quality , convert -resize and convert -density ? convert -quality ...
cardamom's user avatar
  • 592
0 votes
0 answers
84 views

Imagemagick: How to a PNG with the highest possible quality?

I tried messing around with parameters, but it seems I can't get it to work. Here's what I got: convert resize 491.33 "image1.png" -quality 90 image2.png. The result is okay-ish, but I feel ...
Kristian Nordestgaard's user avatar
0 votes
2 answers
28 views

Imagemagick: Can I set a max height of the watermark image?

I have this BASH script, which scales the watermark image: #!/bin/bash echo "Which file to watermark?" read -e "filetowatermark" echo "Which file to use as watermark?" ...
Kristian Nordestgaard's user avatar
1 vote
1 answer
55 views

Numerically ordered inputs to ImageMagick

I have a directory full of ordered jpg files like so: 1.jpg 2.jpg 3.jpg . . . 265.jpg On Windows, I could combine these files consecutively, in order into a file scan.pdf using magick %d.jpg[1-n] ...
shea's user avatar
  • 25
0 votes
2 answers
39 views

imagemagick convert: limit trim to max X px

Using ImageMagick (6.9.11-60 on debian stable), I'd like to shave off 24px left and right of an scanned page (jpg or TIFF), but only if that area would actually be "empty" (i.e. mostly white)...
Jan's user avatar
  • 7,782
0 votes
0 answers
83 views

Imagemagick 6.9.11-60 - how to remove blue background

Imagemagick 6.9.11-60 on Debian. The images of b/w documents taken near the window all have the blue background: how to eliminate that background? (the docs are b/w) I can't post the full pictures due ...
minto's user avatar
  • 535
0 votes
1 answer
387 views

Imagemagick, how to print date the photo was taken on the image

Imagemagick 6.9.11-60 on Debian. How to print date & time the photo was taken on the image? (on existing images). I have set this option in camera settings, but it only applies to new photos. The ...
minto's user avatar
  • 535
0 votes
1 answer
65 views

Image Magick produces two PDF pages from a single TIFF with convert

with Debian and this version of image magick: convert --version Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org Copyright: (C) 1999-2021 ImageMagick Studio LLC License: ...
freezr's user avatar
  • 11
0 votes
0 answers
184 views

print pdf with no margins

I have a small script that reads a mailbox and prints any attached pdf using cups lp. This is mostly for printing package labels. Some companies however supply a label with no margins which will be ...
Esben Skov Pedersen's user avatar
3 votes
2 answers
640 views

Command line glob to view multiple images using ImageMagick's display

How can I open multiple images files using ImageMagick's display command? If I enter say display *.png in a directory containing multiple PNG files, only one is displayed. I think I'd prefer them to ...
user7543's user avatar
  • 256
0 votes
1 answer
59 views

Asterisk pbx agi php script with imagick imaging on the fly not working

Problem description: Generate an image with an ASTERISK AGI PHP script that is displayed on a phone (Yealnk) using imagick. installed:php-imagick/oldstable,now 3.4.4+php8.0+3.4. The AGI PHP script ...
Edderpet's user avatar
0 votes
2 answers
38 views

Imagemagick: Split image vertically from bottom, resizing the last part

I want to split a image with dimension 128x? into multiple 128x128 parts, with the last part being resized to height 128. I want the first output image to be from the bottom of the input image. I used ...
reign's user avatar
  • 113
0 votes
0 answers
127 views

Imagemagick, how to remove a stamp and marks from an image?

The scanned document image (grayscale) have two handwritten marks on the top and seal stamp at the bottom. I want to remove these marks and seal by replace them (hide) with same size rectangles, ...
minto's user avatar
  • 535
0 votes
0 answers
43 views

How to set -level values via Imagemagick GUI prompt?

How to set required -level values via ImageMagick GUI dialog prompt? For example, I want set values -level 10%,90% from Imagemagick GUI prompt. It's not clear, what values in GUI dialog correspond to ...
minto's user avatar
  • 535
1 vote
1 answer
53 views

Finding the correct -level operator values for the Imagemagick script

I need process scanned book images and remove the gray background. I want to find a correct -level operator values for the Imagemagick script. To do this, I need to make a series of tests and compare ...
minto's user avatar
  • 535
0 votes
0 answers
206 views

How to split image vertically with fixed height and overlap, with imagemagic?

I use convert -crop 1x4+0+30@ +repage in.png out.png to split a long image vertically to parts with 30px overlap. I want to make output parts with a fixed height, like 768px, but convert -crop 100%...
Galaxy's user avatar
  • 237
3 votes
3 answers
928 views

Batch split images vertically in half, sequentially numbering the output files

I have a folder with scans of a book numbered 001.jpg through 092.jpg The scans have two pages of the book scanned together. What I want is split these by two from the middle vertically and regenerate ...
Plato's user avatar
  • 77
0 votes
0 answers
103 views

Imagemagick not found by other apps, but needs to be updated in any case. How best to remove and install v7-

I am running Mint 21.1 64 bit. I believe that Imagemagick v6.. was installed via the 'synaptic package manager'. I now require Imagemagick v7, to dovetail with another app that will not work with v6 ...
Birdman's user avatar
0 votes
1 answer
1k views

how to find all pics in a directory and its subdirectories and run a command on them

how to find all images in a directory and its sub-directories, with types gif, jpg, jpeg, png, ico, and run mogrify -strip your_filename.jpg on them? Can the command mogrify -strip corrupt an image? ...
stacking and exchanging woohoo's user avatar
2 votes
2 answers
295 views

Copy directory tree and then recursively convert all JPG files in-place

I would like to run the command convert -strip -interlace Plane -gaussian-blur 0.05 -quality 75% 002-02.jpg test .jpg on all .jpg files in the following subdirectory ├── House Altar Data │   ├── ...
Reuben's user avatar
  • 21
-1 votes
1 answer
284 views

png images to single pdf

I have Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 on Ubuntu 20.04. I tried convert *.png out.pdf to convert 70 png files into a pdf, but strangely always only 18 pages in the pdf file. I didn'...
wsdzbm's user avatar
  • 2,846
0 votes
2 answers
389 views

How to use jpegoptim to have files only 20kb in size?

I have tried using jpegoptim and even tried the manpage but am stumped. Here is a file I want to reduce to 50k and even open to reducing quality of the data - Image: Filename: shirish.jpg Format: ...
shirish's user avatar
  • 12.5k
1 vote
1 answer
600 views

Convert JPG to A4 PDF without white space on top with Imagemagick

I am trying to convert JPGs documents of varying sizes to A4 paper. (photos of documents taken from the NextCloud Android App "scan document" function). But the problem is also reproduceable ...
Alex's user avatar
  • 436
3 votes
2 answers
954 views

Convert each line of a text file into a separate image using imagemagick convert

I would like to take a text file with about 1,000 lines and create a separate png image for each line in the file using possibly ImageMagick convert. The image should be 1920x1080 with a black ...
Designs Edge's user avatar
1 vote
1 answer
2k views

How to remove a specific color from a whole pdf document?

Is their a way, with imagemagick, pdftk or other stuff, to remove a specific color from a whole pdf document? I mean, I give an html hex color code to a tool, and it remove all occurences of this ...
fauve's user avatar
  • 1,278
0 votes
2 answers
217 views

Scale images to fixed target pixel size

I want to reduce the size of my JPG images to the same total pixel size (e.g. 6MPx) no matter of the input size or ratio. Of course mogrify or convert can resize: This ... mogrify -resize 3000x3000 ...
pLumo's user avatar
  • 22.7k
1 vote
2 answers
1k views

Resizing Images in Linux

I have various folders with high res images sizes some more than 6000px x 4000px. some are 5000px x 3000px, size varies with folder to folder. I want to resize all images for saving resources like ...
user1757774's user avatar
1 vote
0 answers
492 views

How to concatenate multiple images in 2d directions using Imagemagick?

I have a bunch of images of the same size. I want to stack them onto and beside each other in 2d space. (tl: top-left) tl | tr bl | br I'm currently first stacking horizontally, then stacking ...
Zeta.Investigator's user avatar
1 vote
1 answer
970 views

ImageMagick not converting grayscale to RGB

Trying to use ImageMagick to resize, convert images from grayscale to RGB, and from jpg to png. Using the flags to convert to RGB as per: https://stackoverflow.com/a/34875248 convert test.jpg -...
cat pants's user avatar
  • 487
3 votes
1 answer
2k views

How to convert output of a terminal app to an image?

Suppose the CLI application my_bin produces an output in terminal which consists of colored text, Unicode symbols and emojis. How can I convert the output to a svg or an image on Ubuntu? For example, ...
Zeta.Investigator's user avatar
1 vote
1 answer
111 views

How can I limit an operation in imagemagick to just the lower half of the picture?

Starting with the command below, I would like to apply -fill red on the top half of the picture and -fill green on the bottom half. (I know I could break up the picture, and reassemble it after the ...
pkrauss6171's user avatar
0 votes
0 answers
106 views

Enumeration Stamping pdf pages with Imagemagick

A .pdf file has 100 pages of images. The goal is to enumerate pages 81-90 in the upper left hand corner. I have been able to enumerate .jpg (Raster) images with imagemagick top=/Users/user/Desktop/...
gatorback's user avatar
  • 1,384
4 votes
3 answers
2k views

Point out my mistake while converting TIFF to PNG/JPG

This is a input tiff image, which I want to convert to JPG/PNG. googledrive-link-to-download-sample As general rule of thumb, I always use following command to convert between 2 image formats (mainly ...
Garid Z.'s user avatar
  • 552
0 votes
1 answer
55 views

Combine Multiple pdfs with a new page with text between each

I've read through and tried multiple posts on similar topics and none satisfied my purpose. I have multiple pdfs which are project reports for each week of a 16-week project and are titled Week1.pdf, ...
quics-ilver's user avatar
0 votes
2 answers
253 views

check width of image before convert it

I use the following script to convert all jpg and png images: # absolute path to image folder FOLDER="/home/*/public_html/" # max width WIDTH=1280 # max height HEIGHT=720 #resize png or ...
Mikel Tawfik's user avatar
0 votes
0 answers
447 views

The process was killed by the system. Why?

I was trying to convert large pdf file to jpg images by command line, using ImageMagick 6.9.7-4 tool (Ubuntu 18.04). convert -density 300 file.pdf page_%.jpg It gave no output, just message that the ...
Untitled's user avatar
2 votes
1 answer
2k views

Set PDF tags while converting images to PDF with ImageMagick

I'm converting images to a single PDF-file using convert utility: $ convert "document-*.tiff" -compress jpeg -quality 60 "output.pdf" Resulting document has the following tags set ...
anlar's user avatar
  • 4,195
0 votes
1 answer
119 views

How can I use one input file into several separate operations

I would like to read one file, do an operation with several different parameters on it and finally save each output as a separate file. Currently I do it as shown in the code snipped below. This reads ...
Jona Engel's user avatar
0 votes
1 answer
1k views

how to use ImageMagick's crop to remove "watermark"

How can I use ImageMagick's command line utils to crop several iamges so that I remove the watermark on the bottom of them? Context I have a personal website for my family where I post our photos. A ...
user avatar
1 vote
1 answer
2k views

How to scale down PDF file (in pixels and in cm)?

I need to automatically convert my pupils' solutions which are photos and scans of various orientations, resolution, quality and file format into a single PDF with fitting dimensions. The dimensions ...
Photon's user avatar
  • 119
1 vote
1 answer
1k views

efficient way to compose all frames in a video to a single image

I've got a 720p video file that is about 20 minutes long. I want to compose each frame in the video using a single operator (e.g. lighten, darken, etc.) to produce a single image output. My thought ...
Michael's user avatar
  • 544
1 vote
1 answer
821 views

Pipe from xwd to ImageMagick's convert produces cropped image

I'm trying to take a screenshot of a remote host (using xwd) and convert it to png (using convert). I need it to be an unattended oneliner, so this is what I'm doing: sshpass -p THE_PASSWORD ssh user@...
José Tomás Tocino's user avatar
1 vote
1 answer
538 views

ImageMagick -gravity: portrait-photo frame-of-reference rotated +90

Context iPhone photos of both: portrait & landscape to be time-stamped with EXIF data, via ImageMagick 7.0.10-62 Q16 x86_64 2021-02-07 + Catalina MacOs. ImageMagick installed via:brew install ...
gatorback's user avatar
  • 1,384
0 votes
1 answer
917 views

How to loop sequentially through images in one folder and compare with the latest image in another folder

I am trying to use the shell to loop sequentially through images in one folder and compare with the latest image in another folder. One error i'm getting is - zsh: no matches found: /TiffOut/*.tiff(....
shfury's user avatar
  • 101
4 votes
2 answers
2k views

How can you compress images in a PDF?

How can you increase the JPEG compression level on a PDF using batch tools under Linux? Obviously you can use gs -dPDFSETTINGS=/screen or /ebook, but that downsamples the PDF - it reduces the DPI. It'...
Zaz's user avatar
  • 2,597
0 votes
0 answers
230 views

Linking to wrong .so file on Fedora 33 (libx265) when compiling ImageMagic

On Fedora 33, I'm trying to compile ImageMagic from git. libx265 and libheif are installed from the Fedora fusion repos, along with their -devel packages. When running ./configure --prefix=$HOME --...
polemon's user avatar
  • 11.6k
0 votes
1 answer
507 views

bulk resize height*width problem

I'm trying to resize all images in a directory using this bash script : for i in *.jpg; do printf "Resize $i\n" convert "$i" -resize 336x336 "$i" done But when ...
Maifee Ul Asad's user avatar

1
2 3 4 5
7