Problem converting colorspace

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
Posts: 13
Joined: 2008-08-28T20:45:14+00:00

Problem converting colorspace

Post by dirving »

Hi guys,

I have an issue that's either caused by me being dumb (a strong possibility) or an issue in the latest IM (6.7.5-6). I have a small image conversion program that I wrote to help with some day-to-day tasks and I was previously using IM version 6.4.7 in which this code worked. Wanting to keep up with the times, I upgraded to 6.7.5-6 and I now get an error. The code (I did remove some error checking code, etc to keep it as simple as possible but I will add it back if requested) is:

Code: Select all


exception = AcquireExceptionInfo();

if (strcmp(currentColorspace, "cmyk") == 0) {
        cmykProfile = FileToBlob("USWebCoatedSWOP.icc",~0UL,&length,exception);

rgbProfile = FileToBlob("sRGB.icc",~0UL,&length,exception);
MagickSetImageColorspace(wand, RGBColorspace);
wand = DestroyMagickWand(wand);
The hope here is that it converts an image in the CMYK colorspace to an RGB colorspace. The error I receive is a fatal error and happens when the DestroyMagickWand call is made. The error is:

magick/semaphore.c:273: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) ((void *)0)' failed.

Like I said, this worked great before so I either I had a bug that worked in my favour or something has changed and I need to adapt my code. Any thoughts/comments/etc are appreciated!

User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T18:32:55+00:00

Re: Problem converting colorspace

Post by magick »

Post a URL so we can download your program along with any requisite image or color profiles. We need to reproduce the fault and trace it with a debugger to determine if its a logic error or a bug in ImageMagick.
Post Reply