A
A
Arx7772015-12-07 15:51:37
ImageMagick
Arx777, 2015-12-07 15:51:37

How to fill text in ImageMagick with desired color?

You need to fill the text with the desired color in this image
6fc8ec9fd4f94cd99bc0fe82b115f6e5.png
using ImageMagick
. I do it this way:

convert -background transparent temp1.png \( -clone 0 -fill '#3e312b' -colorize 90% -draw "color 0,0 reset" \) -compose atop -composite temp.png

But as a result, it turns out only to set the color of the outer stroke. If you -backgroundspecify not transparent, but the desired fill color '#3e312b', then everything is filled with a rectangle. 606ab8fe9b77482d9175c0f4ed68f531.png
It should turn out like this (filled in gimp for a sample, as it should be) f33f6e5f89994b7097794597201148f5.png
PS I know that it -fill '#3e312b'is perfectly used to fill external text with the desired color, if the text is not transparent and I understand that the stroke in this case is correct. Because inside the letter transparent. But you need to fill it in exactly this format, without changing the internal transparent in the original version.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question