Questions tagged [imagemagick]
ImageMagick is an open source software suite for displaying, converting and editing raster image files.
8,775
questions
0
votes
0
answers
19
views
Does ImageMagick decrease image quality by default?
I use ImageMagick to convert images from one format to another, to convert them into a single PDF, to rotate them according to camera orientation, to trim white space, or sometimes to change ...
0
votes
0
answers
15
views
A problem converting image to monochrome with ImageMagick
Why the out.png is not white?
convert -monochrome in.png out.png
convert --version
Version: ImageMagick 7.1.0-6 Q16-HDRI x86_64 2021-09-04 https://imagemagick.org
Copyright: (C) 1999-2021 ...
0
votes
0
answers
15
views
ImageMagick with AWS Lambda
I am trying to convert an high resolution image into three different formats in AWS using lambda service.
I followed the code form this link
But the problem I see is
The resolved image is filled with ...
0
votes
1
answer
20
views
Bulk extract dominant colors from multiple images with imagemagick
I've a number of images that I want to extract the most dominant colors from using Imagemagick. Using this script:
area=$(magick *.png -format "%[fx:w*h]" info:)
magick *.png -kmeans 10 -...
0
votes
1
answer
26
views
How to use ImageMagick to put background under animated, rendered foreground
I have some rendered, animated planets with a transparent background (checkered in most viewers) and want to put a background star field behind them, like this:
I'm currently rendering a flat plane ...
0
votes
1
answer
38
views
ImageMagick: Put curved text over image
I want to use ImageMagick to annotate images with curved text. Creating curved text on a plain image works:
convert -size 600x500 xc:white -pointsize 72 -fill red -annotate +100+200 "C H E S S&...
0
votes
1
answer
44
views
ImageMagick unable to turn white in transparent without getting ugly edges
I am trying to remove the white from 5k+ pictures and turn it into transparent. Unfortunately, when I do this it leaves a ugly edge around the black parts in various gray tones.
I tried various ...
-1
votes
0
answers
34
views
unable to open image No such file or directory @ error/blob.c/OpenBlob/2701
i have a problem with image magick in symfony. I upload file '.pdf' from modal-dialog to application. Then i want to without saving file, using image magick create '.png' file, but i get error like ...
0
votes
1
answer
19
views
Imagemagick Keep File Names & Add Prefixes
I have a script that resizes all images from a source directory into a destination directory, but I need to keep the original filenames and add "100-", "200-" and "400-" ...
0
votes
1
answer
46
views
Automated Script to Rename and Resize jpg Images
I have a bit of a difficult problem to solve.
I have a folder that contains a large amount of image files, and new image files are added daily (all JPG) that are named in a way that ensures there are ...
0
votes
1
answer
23
views
ImageMagick apply shadow effect in bulk
I'm trying to apply a drop shadow effect to some files i have in a folder. Similar to whats done in Photoshop but I'm trying to apply in bulk.
This is what I'm trying to achieve
Does anyone have any ...
0
votes
0
answers
14
views
HEROKU ImageMagick not detected
I'm working on MoviePy to burn subtitles into video. Using TextClip
subData = processSrtFormatData(request.json['subData'])
subtitles = SubtitlesClip(subData, styleForText)
...
0
votes
1
answer
22
views
how to imagemagick crop only width
im trying to crop an image of size 1920x125058 into 900x125058 from the center
so I used magick convert in.png -crop 900x+510+0 out.png but this outputs a file of size 900x28800. shouldn't the height ...
-1
votes
1
answer
23
views
ImageMagick: How to fix delegate failed `'potrace' error
I am trying to convert a PDF to SVG with Image Magick. I run the following command:
magick input.pdf output.svg
I get the following error:
magick: delegate failed `'potrace' --svg --output '%o' '%i'' ...
0
votes
2
answers
28
views
Batch command for ImageMagick to crop width of all files in a directory
I have hundreds of images in a folder of size 1920x~100,000. I need to cut out the middle 900p of every file leaving the height unaffected. how do I pass each file to this command? magick convert ...
0
votes
1
answer
13
views
PNG-Preview of animated GIF with ImageMagick is distorted
I am creating preview images of all JPG/PNG/GIF that are uploaded to our server.
For this I use ImageMagick with:
convert -format jpg -quality 90 -strip -background white -flatten -alpha off +repage -...
0
votes
0
answers
11
views
Looping Image Magick Command - Win10
I'm trying to loop the below command so that it runs through each file in a folder ie c:\Test
Would anyone be able to share a suggestion for getting this to loop as i have 100+ files I would like to ...
0
votes
1
answer
19
views
Image Magick - Cropping picture into circle
I have 100+ png files all 500x500, I'm trying to crop a circle in the centre of the image 400x400 and save it into a separate png, keeping the 500x500. example below
Does anyone know how to use image ...
2
votes
1
answer
52
views
Perl ImageMagick: how to disable printing of command output?
I have a Perl script:
#!/usr/bin/perl
use strict;
use Image::Magick;
my $temp_filename = 'temp.webp';
my $im = Image::Magick->new;
my $m = $im->Read($temp_filename);
When I run it from the ...
0
votes
0
answers
29
views
wand.image Import Error: shared library not found. You probably had not installed ImageMagick library
I am attempting to use the PDFPlumber library, which uses Wand's image format. However, upon trying to run:
from wand.image import Image
I get this error:
Traceback (most recent call last):
File &...
0
votes
1
answer
34
views
How to cut an overlong PDF page in a series of A4 PDF pages with ImageMagick
I have an overlong PDF containing text and image elements. Here an example:
How can I split this page into a PDF with mutiple A4 pages where the first pages contains the top bit, the next page what's ...
0
votes
1
answer
16
views
ImageMagick: Cylinder keeping original on background
I'm trying to make a cylinder wrap via ImageMagick. It's working fine on creating the cylinder, but it's keeping the original image on back.
magick \
-verbose \
\( \
-size 2585x1181 \
xc:...
1
vote
0
answers
55
views
How to convert an image from polar to cartesian coordinate in golang? [closed]
How to convert an image from polar to cartesian coordinate in golang?
Currently i can do it with imagemagick using:
convert polar_arctic.jpg -distort DePolar 0 world_restored.jpg
but don't want to ...
2
votes
0
answers
97
views
ImageMagick lambda layer aws SAM
I have the following template.yaml from a SAM application
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
image-resizing-lambda-js
Sample ...
0
votes
0
answers
23
views
Imagick resizeImage(): What argument to use when not specifying maximum height in imagick?
I'm using imagick 3.7.0 compiled against ImageMagick 7.0.10-23 Q16 x86_64
In previous versions of imagick, I could resize an image with the width specified but the height unlimited using this command, ...
0
votes
0
answers
61
views
Generating a low res image with clear text
I'm trying to create a table (width = 190px, height = 128px) that is filled with some text and save that as an image. I managed to do that both with matplotlib and by simply generating a HTML table ...
0
votes
1
answer
35
views
Thumbnail image from DNG file is inappropriate using imagemagick or exif tool
I have a DNG image and a cropped monochromatic version of the image. Both are generating the same file as the thumbnail when I run any of the below commands:
magick.exe C:\sample1crop.dng -resize ...
0
votes
1
answer
19
views
Installation of imagemagick with Homebew not found by python
I am trying to use wand on python on my Mac Monterrey. When I run the command on python from wand.image import Image as Img I get the error ImportError: MagickWand shared library not found. You ...
0
votes
1
answer
41
views
how delete one page from pdf by imagemagick
i m Wana Delete One page from PDF By imagemagick , How can this be done? this my code this return just one page in pdf ? what the problem ?
$image = new \Imagick(__DIR__.'/test.pdf');
$pageNumber ...
0
votes
0
answers
23
views
I am trying to save 360 png files as a gif with image magick in R (I am working with MacOS)
please let me know any other system/code I need to include, as I am not as familiar with writing out images to my computer. I am creating 360 png files as follows:
for(theta in 1:360){
ic=as....
1
vote
2
answers
59
views
generate thumbnail for every image in folder
I am trying to write a bash script that generates small thumbnail versions for every image in a folder, so I can use it for more efficient image loading in react.
The selected answer from this ...
1
vote
1
answer
38
views
Magick equivalent of GIMP Hue-Chroma transformation
Using Gimp, given an input image, I can improve its contrast using Colors > Hue Chroma... by setting Chroma=50 (in a scale between -100 and 100) and leaving Hue=0 and Lightness=0. So it appears I'm ...
0
votes
0
answers
31
views
Wrong whitebalace/colorgrade for arw files in ImageMagick - updated -
I want to convert SONY raw files (.ARW) to jpg with imagemagick.
But there is a problem with the whitebalance (probably).
When I open the files in ACDSee or XNView, they look like the jpg-version off ...
0
votes
0
answers
32
views
Ubuntu 18.04 :Convert command in Imagemagick not responding
edit imageI have installed imagemagick in my Ubuntu 18.04 system. When I type the convert command (eg convert -help, convert -version) in my system it is not responding. It is not showing any error it ...
2
votes
1
answer
46
views
Trying to crop out center circle from polar coordinate picture
I've been struggling through a few iterations of solutions, trying to get a photo that's been converted to polar coordinates (originally rectangular hemispherical photo) to crop out areas outside of ...
0
votes
1
answer
42
views
Imagemagick not working in php but working in terminal
I want to convert images to webp format.
This is my php code :
$im = new Imagick();
$image = file_get_contents($url);
try {
$im->readImageBlob($image);
$im->setImageFormat( "...
0
votes
1
answer
27
views
Splitting a region of an image into tiles
I have a set of images that are 4500px x 3000px in size.
Out of each of these images I need to extract a set of tiles in a 5 columns by 3 rows combination with each tile being 700px wide by 500px high....
0
votes
0
answers
39
views
R magick `image_annotate()` produces `NonconformingDrawingPrimitiveDefinition text` error
When trying to add text to an image with the image_annotate() function from the magick package in R on macOS, I now get an error complaining of NonconformingDrawingPrimitiveDefinition text.
I have run ...
1
vote
1
answer
170
views
OpenCV output monochrome TIFF group 4 compression
Is there a way to output monochrome TIFF files in OpenCV with group 4 compression?
This is the command to do it with imagemagick/graphicsmagick
'gm convert '.$file.' -type bilevel -monochrome -...
0
votes
0
answers
25
views
ImageMagic - C++: When trying to change font, I'm getting error
I'm trying to write text into image by this code:
Image image( "1920x1080", "black" );
image.font("-*-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-1");
image.draw(...
0
votes
1
answer
30
views
Merging Images Vertically in Multipe of 2
I have a situation where from a folder , I would like to merge 1 and 2 nd image vertically , 3rd and 4th Image vertically and so forth .
I have searched and found that Image magic does merging of ...
0
votes
1
answer
41
views
Loop through images, detect if contains color, put in subfolder
I have two kinds of images in my folder: One is all black, the other one is black with yellow (#f8fa27). I am trying to put all the images with yellow colour in a subfolder. But I don't know how this ...
0
votes
1
answer
54
views
Crop Manim Animation to Match Content Size
For the following Manim code, I would like to (automatically) produce an animation that only contains the equation eq with no empty space surrounding it. How can I accomplish this?
from manim import *
...
1
vote
0
answers
17
views
Imagemagick Rotate only one item
I have the following command. I am trying to get just the text to rotate 90º however the item immediately after it also rotates. I tried using () brackets with no luck. I only want the text rotated. ...
1
vote
2
answers
44
views
Is there a way to darken an image except for a rounded rectangle in ImageMagick?
To demonstrate.
Original:
After ImageMagick:
I have some ideas:
Duplicate the image, crop the duplicate, then flatten the images together
Reverse mask?
Does anyone have any suggestions?
0
votes
1
answer
107
views
Kitty graphics protocol not working in kitty only
I have a c program, that should print an image to a terminal, using the Kitty graphics protocol and utilizing ImageMagick 7.
I created this minimal example from the code i have. Note that error checks ...
0
votes
2
answers
30
views
How to call an external command in Gimp Plugin?
How to use an external command to make an edit of pic in the gimp and then return the result to the stage in a plugin or script.
Example in shell script.:
magick label.gif +matte
( +clone -shade ...
0
votes
1
answer
62
views
Is there a way with php ImageMagick to count number of pages into TIF image file without loading complete file?
let me describe the scenario.
Environemnt: RedHat linux 7.9 + ImageMagick* + pecl imagick + PHP script.
Scope: Into GUI application user must be allowed to see the single images from a multi-TIF file.
...
1
vote
1
answer
38
views
ImageMagick convert: making xbm format images out of fonts
I'm using the command below to convert font characters into small xbm format images. For example, this line converts 'A' into 1.xmb
convert -font Nimbus-Mono-L -pointsize 10 label:A 1.xbm
This works ...
1
vote
0
answers
23
views
Using a default font for captions
I'm trying to use python3-wand to recreate the following command-line invocation:
$ convert -size 4330x -density 300x300 -background transparent -gravity center -fill grey label:"This is a long ...