Page 1 of 1

Not able to draw text on image

Posted: 2017-04-07T04:06:43-07:00
by him21sri
I want to draw some text over an image and I am trying to that in the below manner :

DrawAnnotation(d_wand,10,10,"Magick");
MagickDrawImage(wand,d_wand);

But I am getting below error :

delegate library support not built-in `none' (Freetype) @ warning/annotate.c/RenderFreetype/1533.
delegate library support not built-in `none' (Freetype) @ warning/annotate.c/RenderFreetype/1533.

Any help is appreciated.

Re: Not able to draw text on image

Posted: 2017-04-07T04:34:11-07:00
by snibgo
So your IM probably doesn't have freetype. What does "convert -version" say? It should be something like this:

Code: Select all

Version: ImageMagick 6.9.5-3 Q16 x86 2016-07-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

Re: Not able to draw text on image

Posted: 2017-04-07T05:52:08-07:00
by him21sri
yes my imageMagick do not have freetype

convert --version
Version: ImageMagick 6.8.9-10 Q16 x86_64 2017-04-07 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib jng jpeg png zlib


Can you please point me to the link from where I can download and install the same

Re: Not able to draw text on image

Posted: 2017-04-07T06:44:15-07:00
by snibgo
You are also missing delegates such as png and tiff. I suggest you reinstall or rebuild IM.

Re: Not able to draw text on image

Posted: 2017-04-10T05:03:33-07:00
by him21sri
Thank you, Installed a fresh ImageMagick and all delegates were present. I am able to draw text over an image now.

I have another problem, I want to add padding to the image on the sides, for this I am using MagickExtentImage API where I will provide the offset where the image will be placed and on the side padding comes. Currently the padding is in white color, can I somehow make this transparent.

Re: Not able to draw text on image

Posted: 2017-04-10T07:20:40-07:00
by snibgo
Use a background of "none" (which is fully transparent black).