[ImageToolbox] Adding text to the image not working.

[ImageToolbox] Adding text to the image not working.

  
Forge Component
(6)
Published on 4 Jan by Breno Nico
6 votes
Published on 4 Jan by Breno Nico

Hi,

In our project we need to have possibility to render text over the image

I've tried " -pointsize 72 label:Hello  " in the options for Convert action but it returns the same image without any text. Should the component support this commands https://www.imagemagick.org/Usage/draw/ ? Or how should I modify it to have the support?

Thank you in advance.


Nick

Solution

Hi Mykola,

Try the following, -gravity south -annotate 0 'You text here'.

-annotate is used exactly to place text in an image but it seems to require the usage of -gravity to indicate where the text will be placed. Then you can use other parameters to set -font, -pointsize, -fill, -stroke, etc.

I've tested it with the command line but it should work the same for the extension.

Cheers

Solution

Hi André,

That worked!

Thank you very much