Page 1 of 1
Cant get color match to work
Posted: 2008-08-25T14:21:24-07:00
by spectrum24
Hi
I'm trying to make some colors transparent. On 2 local computers, this works fine.. like this..
convert monday.gif -fuzz 25% -transparent #00E9E7 output.gif
But on two remote servers, it doesnt work at all. Nothing gets made transparent. If i try it with pure colors like 0000FF or 00FFFF then it does work. But anything other than a pure color wont become transparent, even if i set fuzz to 100% !
Doing it the other way, like -fill none +opaque #00E9E7 makes everything black. So it acts like it cant match anything thats not a pure color.
Only thing different is i'm using remote desktop to access the servers. Any ideas greatly appreciated!
Re: Cant get color match to work
Posted: 2008-08-25T15:46:49-07:00
by fmw42
I don't know if either of these suggestions will help, but you can try:
1) enclose your color in quotes, e.g. "#00E9E7"
2) try converting #00E9E7 to "rgb(0,233,231)" and use the latter, e.g -transparent "rgb(0,233,231)" and see if that works
3) add -channel rgba -matte after your input image
Is it the same image on all the computers or different ones. If the latter, then perhaps there is something odd about that image.
What versions of IM are installed on each computer? Perhaps there was a bug at some point in the IM versions on the servers? If you can, upgrade to the latest version of IM.
Re: Cant get color match to work
Posted: 2008-08-26T05:33:21-07:00
by spectrum24
Thanks i'll try those. It is the same version of IM on all machines, i just downloaded it.
I've found through further experimentation that it is the fuzz that doesn't work. any color will match, not just pure ones. Oddly enough, the color shown in other programs (0,231,235) is not what is shown in the histogram in IM (4,231,235). If i do a transparency against the latter color, it works. But it didn't work before, because fuzz is not working.
Re: Cant get color match to work
Posted: 2008-08-26T10:21:19-07:00
by fmw42
I suggest you provide an example image that does not work and submit it to Bugs with your note about a potential issue with both -fuzz and the histogram. Are you getting the histogram from -verbose info or from histogram:info:
If it works on your local computers but not the servers and they all have the same version of IM, then the issue is likely with the server setup and configuration (of IM?) and not IM itself.
Anyway, if you still feel there is an issue, you should provide your command lines and the output. The IM folks can then look at your image to see if it has any oddities and test against -fuzz and histogram to be sure they are working.
Gif images can be kind of strangely interpreted. I don't know enough about them, but perhaps different systems utilize and convert them differently.
Try converting your gif to png. Then check the histogram from -verbose info to find out what colors are there and if they have been changed. Are you on Q16 or Q8 IM? That could be an issue in how IM handles the gif. Once you get the png and know the color, then try your -fuzz -transparent and see what happens.
By the way, Gifs only support binary transparency (all on or all off). PNG is much better format for transparency.
Re: Cant get color match to work
Posted: 2008-08-26T23:17:19-07:00
by anthony
It may be the different machines use different shells that may or may not handle '#hexvalue' correctly. I suggest you quote it regardless.
Re: Cant get color match to work
Posted: 2008-08-27T17:54:32-07:00
by spectrum24
Well, I found a workaround by specifying the actual colors with multiple -transparency commands, there's only 2 or 3 i need. But i think it's still a bug, I'll submit it as recommended.
Re: Cant get color match to work
Posted: 2008-08-27T19:40:19-07:00
by fmw42
I recently found some bugs with -fuzz in connection with -floodfill and -draw and submitted them. They now have been fixed in IM 6.4.3-5 (current release). So you might download that and try again. If it still persists, then provide your image and command lines for IM testing.