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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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