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
3 votes
2 answers
208 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 ...
user avatar
0 votes
1 answer
46 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 ...
user avatar
  • 960
0 votes
0 answers
74 views

How to control webcam's exposure time (using V4L2) based on the certain pixel's value?

I'd like to control the exposure time such that certain average value of certain window (e.g. 10x10+230+70) always fall between 100 to 220. /p.s. Camera is monochrome/ Something like following: loop ...
user avatar
  • 117
0 votes
1 answer
20 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 ...
user avatar
  • 20.7k
0 votes
0 answers
33 views

PCS illuminant is not D50

I am trying to convert the following JPEG image into PNG: https://github.com/SixLabors/ImageSharp/issues/74#issuecomment-282734380 but I fail to understand what ImageMagick is trying to tell me. ...
user avatar
  • 2,129
0 votes
1 answer
138 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 ...
user avatar
0 votes
0 answers
65 views

Imagemagick: resize to given physical size, keeping pixel count

I have an image of Pixel size: 2598 x 1732 Print size: 36.08 in x 24.06 in Dpi: 72 I want to convert it with Imagemagick to Pixel size: 2598 x 1732 (the same) Print size: 12 cm x 8 cm (my target) ...
user avatar
0 votes
0 answers
81 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 ...
user avatar
0 votes
0 answers
82 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 -...
user avatar
  • 333
1 vote
1 answer
189 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, ...
user avatar
1 vote
1 answer
39 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 ...
user avatar
1 vote
0 answers
24 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/...
user avatar
  • 1,114
2 votes
3 answers
1k 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 ...
user avatar
  • 117
0 votes
1 answer
18 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, ...
user avatar
0 votes
2 answers
49 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 ...
user avatar
0 votes
0 answers
87 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 ...
user avatar
1 vote
0 answers
474 views

Tools to manipulate and generate apng with good compression in linux command line

I have recently working with apng. But apngs are larger than similar gif. Also I cannot find a good tool to manipulate apng. ImageMagick produces png for all modification, like (-color 124). To ...
user avatar
2 votes
1 answer
565 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 ...
user avatar
  • 3,882
0 votes
0 answers
44 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 ...
user avatar
0 votes
1 answer
414 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
362 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 ...
user avatar
  • 119
0 votes
1 answer
73 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 ...
user avatar
  • 474
1 vote
1 answer
144 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@...
user avatar
1 vote
1 answer
195 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 ...
user avatar
  • 1,114
0 votes
1 answer
196 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(....
user avatar
  • 101
2 votes
1 answer
490 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'...
user avatar
  • 2,302
0 votes
0 answers
111 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 --...
user avatar
  • 10.4k
0 votes
1 answer
98 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 ...
user avatar
0 votes
0 answers
47 views

Treatment of a scanned logo with ImageMagick

I have an image produced by a scan of a logo, that is supposed to have only one tonality. The pixels close to the edge of the logo have various levels of density. The use will require it to go over ...
user avatar
0 votes
1 answer
665 views

ImageMagick generated PDF renders as blank pages in Chrome

I have drawn a png file using Krita: I then converted this file to a pdf file using convert: convert test.png test.pdf When I open this file in my PDF viewer (Evince), I see the image above, just as ...
user avatar
  • 167
0 votes
1 answer
154 views

Output files of mogrify on raw image file conversion to jpg are overly dark

I'm performing a simple transformation of a batch of files taken in RAW mode with an Olympus OM-D EM1 camera (extension is "ORF") to jpeg using ImageMagick. When I run the command, mogrify -...
user avatar
0 votes
1 answer
170 views

ImageMagick - transparent background showing as black pixel in 'histogram:info:' output

My script is this… convert test.png -alpha off -format %c histogram:info: Unfortunately, the output treats any transparent background in the PNG as a black pixel, meaning that the count of black ...
user avatar
1 vote
0 answers
116 views

scanimage returns a broken image

i want to use a raspberry pi (Debian) as scan-Server. For this job I installed SANE and ImageMagick. If I scan with ... Bash: scanimage -p --resolution=25 --mode=Color -l 0 -t 0 -x 210mm -y 297mm >...
user avatar
  • 11
1 vote
1 answer
451 views

Superimpose multiple images

I have multiple pictures that are look alike, they're all black and differ only in the one dot of the screen, I want to combine them in one picture so I can see all the dots in one picture. How can I ...
user avatar
  • 115
0 votes
1 answer
313 views

Rotate image if width is greater than height

I have a few thousand rectangular images of various sizes. I want them all to have a longer height than a width. I want to do this by rotating all images whose height is shorter than their width 90 ...
user avatar
0 votes
1 answer
329 views

ImageMagick compare without generating diff image

I'm using ImageMagick compare to calculate the difference between two images every five minutes on a Raspberry Pi. This takes almost a minute, and I suspect much of the CPU load is due to the ...
user avatar
  • 147
1 vote
1 answer
902 views

ImageMagick - how to preserve exact palette in .PNG

I'm trying to use convert(1) from ImageMagick to convert from .tga to .png (and back again later), while preserving exact palette that was used. Source image is TARGA color indexed file, having a ...
user avatar
  • 2,819
2 votes
0 answers
496 views

ImageMagick refused to convert the animated GIF and killed the process silently due to CPU

I tried with these solutions below, but unsuccessfully: ImageMagick convert problem, command killed or silently exits Using disk for processing of huge images ImageMagick convert out of memory ...
user avatar
0 votes
1 answer
698 views

imagemagic: Convert -gravity center not working

I have a bunch of images and trying to convert them to pdf using the below command: $ convert *.jpg -resize 1240x1753 \ -extent 1240x1753 -gravity center -background white \ ...
user avatar
  • 247
1 vote
1 answer
216 views

How can I use mogrify to target a specific pixel value of the largest dimension so if vertical set height to 'x' or if horizontal, set width to 'x'

So I've successfully used $ mogrify -resize 3000 to accomplish setting dimension on batches of images. What this yields me is exactly that- a group of images that have a 3000px width. The issue lies ...
user avatar
3 votes
1 answer
243 views

libheif giving unknown file type error debian 10

I tried using heif-convert 100 3313.heif 3.jpg to convert my file from .heic to .jpg, but it keeps giving me the error message Unknown file type in 3313.heif. What does this mean? I have libde265 and ...
user avatar
0 votes
2 answers
734 views

Batch conversion of '.tif' images to '.jpg'

I am using Manjaro Gnu/Linux. I have a directory named files, and under this directory, I have around 650 sub directories, with names such as: file1, file2, file3,... Under each sub directory there ...
user avatar
  • 127
1 vote
1 answer
347 views

Imagemagick Text Placement on Images with Varying Dimensions

I want to be able to overlay text in the margin of images with varying dimensions. Images of varying dimensions will have a black margin that is 30% the width of the image. I have the following bash ...
user avatar
  • 2,243
0 votes
1 answer
63 views

Why imagemagick is reading/appending from text file in backward direction

A sample file file.txt regenerated and later used again in the images corresponding to each word present in that text file and.png used.png append_row.png ...
user avatar
  • 304
1 vote
1 answer
143 views

Why this black box and how to remove it

Generated images from a file cat file.txt | while read line; do for word in $line; do convert -background none -pointsize 72 \ -fill orange label:"\ $word" \ ...
user avatar
  • 304
0 votes
0 answers
73 views

Process VNC Server with image processing script

Disclaimer: I don't know a ton about VNC clients and servers so hopefully I am using the right terminology:) I have a VNC "server" running on a raspberry pi that accepts my iPhone as a client. When a ...
user avatar
  • 101
0 votes
1 answer
146 views

How could one, given a thumbnail image in ~/.cache/thumbnails, find the originally thumbnailed image?

I understand that Thunar utilizes tumbler to generate thumbs, and I know these thumbs exist on my system in ~/.cache/thumbnails. My goal is to write a script to check for the existence of a ...
user avatar
  • 111
0 votes
2 answers
297 views

Install ImageMagick over active SSH Session

How could you install ImageMagick over SSH session? I have been using wget http://www.imagemagick.org/download/ImageMagick.tar.gz and then: tar xfvz ImageMagick.tar.gz to unpack the archive, but ...
user avatar
  • 184
5 votes
1 answer
1k views

Shell: Output text to PNG while preserving color

I like to be able to save the output of a shell command as a PNG image without losing the formatting. Kind of like taking a screenshot of the output. some-command-with-color | text-to-png a.png I ...
user avatar
  • 1,295
2 votes
1 answer
123 views

Why this GIF isn't playing smoothly?

in.gif (814KB) in.jpg (1.03MB) Commands i used to generate a gif - convert -coalesce "in.gif" "0.png" for file in 0*.png do composite -gravity center "$file" in....
user avatar
  • 304

1
2 3 4 5 6