SetImageColorspace difference in 6.4.8-9

Post any defects you find in the released or beta versions of the ImageMagick software here. The ImageMagick maintainers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the ImageMagick version and operating system you are using.

SetImageColorspace difference in 6.4.8-9

Postby rmagick » 2009-01-24T08:45:59+00:00

The test program below fails to change the colorspace field the way it did in 6.4.7-10. Here's the 6.4.7-10 output:
Code: Select all
$ ./test_colorspace
ImageMagick 6.4.7 2008-12-17 Q16 http://www.imagemagick.org
Original Colorspace = 1
New Colorspace = 2


Here's the 6.4.8-9 output:
Code: Select all
$ ./test_colorspace
ImageMagick 6.4.8-9 2009-01-24 Q16 http://www.imagemagick.org
Original Colorspace = 1
New Colorspace = 1

Should I expect that field to be set in 6.4.8, or should I do something different?
Please let me know if you need more information.
Here's the test program:
Code: Select all
/*
gcc `Magick-config --cflags --cppflags` test_colorspace.c `Magick-config --ldflags --libs` -o test_colorspace
*/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <magick/MagickCore.h>

int main(int argc,char **argv)
{
    ImageInfo *info;
    Image *image;

    MagickCoreGenesis(argv[0], MagickFalse);
    puts(GetMagickVersion(NULL));

    info = CloneImageInfo(NULL);
    image = AcquireImage(info);
    SetImageExtent(image, 20, 20);
    printf("Original Colorspace = %d\n", image->colorspace);
    SetImageColorspace(image, GRAYColorspace);
    printf("New Colorspace = %d\n", image->colorspace);

    DestroyImageInfo(info);
    DestroyImage(image);
    MagickCoreTerminus();

    exit(0);
}
rmagick
 
Posts: 245
Joined: 2006-03-16T17:30:48+00:00
Location: Durham, NC, USA

Re: SetImageColorspace difference in 6.4.8-9

Postby magick » 2009-01-24T09:29:27+00:00

The problem you reported should be ok because GRAYColorspace is treated internally as RGB, however we have a patch in the latest ImageMagick Subversion trunk available sometime tomorrow. Thanks.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: SetImageColorspace difference in 6.4.8-9

Postby rmagick » 2009-01-24T09:59:06+00:00

Thanks for your quick reply.
rmagick
 
Posts: 245
Joined: 2006-03-16T17:30:48+00:00
Location: Durham, NC, USA


Return to Bugs

Who is online

Users browsing this forum: Google [Bot] and 2 guests