How to pass a Xor method instead of fill a solid color to write a text into an image?
With Xor, I don't need consider what background of the image would be, and where I cannot write text.
Thanks a lot.
mogrify -gravity SouthWest -fill Blue -annotate +5+5 "X-Y=z" test.png
How to annotate text using Xor instead of specific fill color?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to annotate text using Xor instead of specific fill color?
I am not sure I understand what you want. There is no option for -annotate to use Xor. But you can create a text image using label: or caption: and composite it over the background image using -compose Xor.
See
http://www.imagemagick.org/Usage/text/
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#xor
http://www.magemagick.org/Usage/basics/#mogrify_compose
Please always provide your IM version and platform. See viewtopic.php?f=1&t=9620
See
http://www.imagemagick.org/Usage/text/
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#xor
http://www.magemagick.org/Usage/basics/#mogrify_compose
Please always provide your IM version and platform. See viewtopic.php?f=1&t=9620
Re: How to annotate text using Xor instead of specific fill color?
Thanks for the confirmation, I cannot find the option of Xor for -annotate, never thought it does not have
I will do it with 2 steps.
I will do it with 2 steps.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to annotate text using Xor instead of specific fill color?
Annotate writes directly onto the image and perhaps is using a -compose over method. But I do not think there is any define to change the -compose method to Xor, though you can try adding -compose Xor to the command line just before -annotate and see if that changes things.