[RESOLVED] Change color not working

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
yeshia
Posts: 2
Joined: 2017-05-03T10:16:16-07:00
Authentication code: 1151

[RESOLVED] Change color not working

Post by yeshia »

I believe I am doing a pretty simple command here. I realize this is pointless, but if I can figure out why this doesn't work, I can hopefully fix a bigger problem. I am just taking a solid canvas color and trying to change it to another color. I am using version 7.0.5-5 x64, command line Windows 10.
Here are the two commands:


magick convert -size 48x48 xc:green cal_1.png
magick convert cal_1.png -fill red -opaque green cal_2.png

It has no effect. When I change the colors I get different results. For instance, this works:

magick convert -size 48x48 xc:black C:\a\tst1\4\cal_1.png
magick convert cal_1.png -fill white -opaque black cal_2.png


What am I doing wrong? I am hoping to swap colors, so that I can try this with an image with more colors. Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Change color not working

Post by fmw42 »

You are not doing anything wrong. However, leave the convert off and just use magick ...

Use magick mogrify, magick identify, magick montage, but only use magick when doing "convert". magick is the new convert in IM 7

However, there is a bug in the current IM 7.0.5.5 with -fill ... -opaque. See viewtopic.php?f=3&t=31862

So either downgrade IM 7 or use IM 6 until it get fixed.
yeshia
Posts: 2
Joined: 2017-05-03T10:16:16-07:00
Authentication code: 1151

Re: Change color not working

Post by yeshia »

Downgrading did the trick. Wish I had posted a message sooner! Thank you so much. I do not see any way to mark your reply as the answer.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Change color not working

Post by fmw42 »

yeshia wrote: 2017-05-03T18:51:17-07:00 Downgrading did the trick. Wish I had posted a message sooner! Thank you so much. I do not see any way to mark your reply as the answer.
In the future, you can edit the title of your first post at the top here to say RESOLVED.
Post Reply