convert caption: slow

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
dksayers
Posts: 3
Joined: 2015-04-22T22:20:08-07:00
Authentication code: 6789

convert caption: slow

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

Re: convert caption: slow

Post 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.
snibgo's IM pages: im.snibgo.com
dksayers
Posts: 3
Joined: 2015-04-22T22:20:08-07:00
Authentication code: 6789

Re: convert caption: slow

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