Page 1 of 1

[RESOLVED] Change color not working

Posted: 2017-05-03T10:23:01-07:00
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

Re: Change color not working

Posted: 2017-05-03T10:47:16-07:00
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.

Re: Change color not working

Posted: 2017-05-03T18:51:17-07:00
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.

Re: Change color not working

Posted: 2017-05-03T19:13:23-07:00
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.