Page 1 of 1

Drawing function terribly slow in my code

Posted: 2008-03-27T22:50:24-07:00
by amaresta
Hi all,

Sorry for my bad english. I have built ImageMagick 6.3.9 manually for Visual C++ Express edition and i have wrote some code using the MagickWand Interface, but i have realized who the drawing function are terribly slow in my code:

1-I'm working with a simple MagickWand, DrawingWand and PixelWand.
2-I have created a new image with a resolution of 1024x768.
3-If I draw a polyline for create a border of the image (only for testing), or if i draw an arc the functions MagickDrawImage ("BGRA", width=1024, height=768) and MagickGetImagePixels are incredibly slow:

For a simple polyline of 4 points, the function MagickGetImagePixels take around 0.7 seconds.
and MagickDrawImage take around 6 seconds. I gain some speed in release version but the performance remain very poor.

If I draw a big arc and the functions are more slow but I have draw only one graphic object.

I have set MAGICKCORE_QUANTUM_DEPTH to 8, stroke antialias to false, WINGDI32_DELEGATE to true but the performance is the same.

I'm a Celeron M 1.4Ghz, there are some option who i have missed? There is someone who have meet this problem?

ps: it seem who the stroke width dont affect the drawPoint function.

MA

Re: Drawing function terribly slow in my code

Posted: 2008-03-28T05:55:03-07:00
by magick
ImageMagick drawing is relatively slow compared to other rendering engines. With a modern processor at 3ghz and above, the difference is slight but as you've seen its pronounced for the slower older processors. You may want to consider using libArt or GD if speed is an issue.

Re: Drawing function terribly slow in my code

Posted: 2008-03-28T09:13:34-07:00
by amaresta
Thank for your reply.