Drawing function terribly slow in my code

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
amaresta

Drawing function terribly slow in my code

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Drawing function terribly slow in my code

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

Re: Drawing function terribly slow in my code

Post by amaresta »

Thank for your reply.
Post Reply