Skip to main content

All Questions

Tagged with
2 votes
1 answer
1k 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/...
bluenote10's user avatar
1 vote
0 answers
483 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 ...
user1092247's user avatar
8 votes
2 answers
12k 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 ...
dengApro's user avatar
  • 321
0 votes
1 answer
361 views

How can I emulate Paint.NET's 'recolor' tool with ImageMagick?

I'd like to recolor one shade of blue to another in an image (for which I also have vector copies). In Paint.NET, I could pick up the color in my source image, choose a replacement color in the color ...
Sean Allred's user avatar
  • 1,322
3 votes
2 answers
2k views

How to identify black and white images in folder of images

I would like to identify the black and white images in a folder containing 300,000 images which are a variety of colours. An alternative method would be to identify the colour images and treat the ...
ThomasDoe's user avatar
  • 133
1 vote
0 answers
1k views

How to apply clut (Color Lookup Table) using ImageMagick command line

IamgeMagick dcouments its -clut option as "Replace the channel values in the first image using each corresponding channel in the second image as a color lookup table...This operator is especially ...
MSalters's user avatar
  • 8,233
2 votes
1 answer
1k views

ImageMagick failed to convert colors in PDF

I have got a PDF document containing a red font which I want to replace by a black font. I tried the following command according to this answer: convert -density 300 doc.pdf -fill black -opaque "#...
ComFreek's user avatar
  • 591
4 votes
2 answers
15k views

Getting the predominant colour in an image?

Is it possible to get the predominant colour in an image from the command line? Ideally I'd like it back as hex or RGB. I thought it might be possible to do this with imagemagick's identify command, ...
Richard's user avatar
  • 163
4 votes
1 answer
2k views

Thumbnail generation with imagemagick doesn't render the correct colors

Generating thumbnails of PDFs with imagemagick sometimes renders incorrect colors. We're using an old version of imagemagick (6.5.7-8, that's the version installed on the heroku servers). Here is the ...
Bastien's user avatar
  • 161
7 votes
2 answers
2k views

Mass recoloring of PNGs from command line

Similar to the mass rescaling command this site taught me here, is there a command-line trick for mass recoloring? To make it specific, suppose I have a bunch of images with RGB and alpha values: ...
William Jockusch's user avatar