Page 1 of 1

convert caption: slow

Posted: 2015-04-22T22:31:11-07:00
by dksayers
I have several lines of text (from 1 to 5 lines) of different lengths that I need to become an image within an allocated size. I have been using the following command to autosize the text to a 'best fit':

> convert -size 900x170 -font Helvetica -gravity Center caption:"This is first line 1 here:\nLine 2 follows\nLast line" outfile.png

This command has been working fine on my FreeBSD 8.2-STABLE i386 server with ImageMagick-6.7.0.2 and completes in under 2 seconds. Problem is when I run this on our new FreeBSD 9.3-STABLE amd64 with ImageMagick-6.8.0.7 it takes arounf 55 seconds to complete . While running, it max outs the CPU to 100%.
I have no Features compiled in:
> convert -version
Version: ImageMagick 6.8.0-7 2013-04-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:

Is there any way to get the time down to what it was on my 368 server.

Re: convert caption: slow

Posted: 2015-04-22T23:41:23-07:00
by snibgo
Your command is slow on v6.8.0-0 and v6.8.1-0. It is much faster on v6.9.1-0. I suggest you upgrade to the current version.

Re: convert caption: slow

Posted: 2015-04-23T20:02:57-07:00
by dksayers
Thanks for the tip. I was able to do an upgrade and it helped considerably. I am now getting between 2 and 7 seconds for completion instead of 55 seconds. I will need to do more testing but this may be fine.