SetImageColorspace difference in 6.4.8-9
Posted: 2009-01-24T08:45:59-07: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:
Here's the 6.4.8-9 output:
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
$ ./test_colorspace
ImageMagick 6.4.7 2008-12-17 Q16 http://www.imagemagick.org
Original Colorspace = 1
New Colorspace = 2
Code: Select all
$ ./test_colorspace
ImageMagick 6.4.8-9 2009-01-24 Q16 http://www.imagemagick.org
Original Colorspace = 1
New Colorspace = 1
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);
}