Page 1 of 1

Handling bad color names/numbers..

Posted: 2019-09-18T10:30:53-07:00
by dognose
I'm trying to find the best way to deal with bad colors being input..

For example:
# convert -fill darkgold label:Test test.gif
convert: unable to open image 'darkgold': No such file or directory @ error/blob.c/OpenBlob/3497.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.

or
convert -fill '#00000' label:Test test.gif
convert: unable to open image '#00000': No such file or directory @ error/blob.c/OpenBlob/3497.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.

it seems that fill can be a color or image file?

Can I tell IM to expect a color? Or, any suggestions?

Re: Handling bad color names/numbers..

Posted: 2019-09-18T10:45:53-07:00
by fmw42

Code: Select all

convert -fill "#000000" label:test test.gif
works for me. Note that you used 5 zeros and you need 6 zeros.

There is no darkgold at https://imagemagick.org/script/color.php. But there is a dark goldenrod