Page 1 of 1

Annotating image performance

Posted: 2016-05-17T01:32:45-07:00
by rishabh
Hi Everyone,

I am using IM 6.6.6 .
When i am converting image from png to tiff it takes 1 sec.
example
image.read(path.png);
image.write(path.tiff);

But when I add annotation it takes 20 sec
example
image.read(path.png);
image.annotate("this text",somegravity);
image.write(path.tiff);

I want to know the reason. adding annotation is expensive task? Is there a way that i can gain some performance?

Thanks

Re: Annotating image performance

Posted: 2016-05-17T09:04:21-07:00
by fmw42
IM 6.6.6 is about 280 versions old. Have you considered upgrading? Does the 20 sec improve on subsequent repeats? I have seen text processing be slow the first time, but much faster afterwards.

Re: Annotating image performance

Posted: 2016-05-17T23:30:58-07:00
by rishabh
Yes it is 280 version old. I can't upgrade to new version because of various dependency and reasons. I tried with subsequent repeats but performance is still greater than 10 secs. Is there anything that i am missing?? or Is there a procedure to do it much better apart from up gradation?
Thanks

Re: Annotating image performance

Posted: 2016-05-17T23:45:48-07:00
by snibgo
I've never seen "-annotate" take 10 seconds, but nor do I use such old software.

Maybe something strange is happening. What is your platform? How much CPU time is used? How much memory is used? How large is the image (width and height, in pixels)? Q16 or Q8 or what?

Re: Annotating image performance

Posted: 2016-05-18T00:25:38-07:00
by fmw42
What are all your IM delegates? Do you have freetype and fontconfig and are they old versions as well? Perhaps your IM or delegates are corrupt? Does it happen if you use the command line in a terminal rather than your API?