general usage and thread safety

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

Post by magick » 2006-04-15T07:46:02-07:00

ImageMagick is thread-safe at the image level so you can read, process, and write multiple images as long as they are in separate threads. You cannot, for example, rotate a particular image in one thread and simultaneously quantize it in another thread.

Make sure threading is enabled when ImageMagick was built. Check the magick/magick-config.h header file and verity HAVE_PTHREAD is defined. If you continue to have problems, post a short MagickWand program here that we can run and reproduce the problem. We will investigate further.

User avatar
magick
Site Admin
Posts: 10996
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-15T20:46:38-07:00

Two problems. We had a threading issue with the GIF image format. This is fixed in ImageMagick 6.2.7 Beta available tommorrow. The other is a documentation error. Use MagickSetFormat() rather than MagickSetImageFormat() to specify the image format for MagickGetImageBlob(). Thanks for bring this problem to our attention.

User avatar
magick
Site Admin
Posts: 10996
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-17T19:55:22-07:00

Looks like we're missing a semaphore lock in the ImageMagick module methods. We will apply a patch to ImageMagick 6.2.7-1 Beta within a few days.

User avatar
magick
Site Admin
Posts: 10996
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-18T09:31:31-07:00

We have a patch in ImageMagick 6.2.7-1 to make module loading thread-safe. ImageMagick 6.2.7-1 will be available within the hour at ftp://magick.imagemagick.org/pub/ImageMagick/beta. Thanks for the problem report.

User avatar
magick
Site Admin
Posts: 10996
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-18T17:45:56-07:00

Your patch is probably necessary, however, we put a patch in https://subversion.imagemagick.org/subv ... k/module.c
to ensure module loading is thread-safe. If you encounter additional thread safety problems, let us know.

Post Reply