Annotating image performance

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rishabh
Posts: 11
Joined: 2016-03-28T02:33:43-07:00
Authentication code: 1151

Annotating image performance

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Annotating image performance

Post 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.
rishabh
Posts: 11
Joined: 2016-03-28T02:33:43-07:00
Authentication code: 1151

Re: Annotating image performance

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Annotating image performance

Post 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?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Annotating image performance

Post 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?
Post Reply