Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Test code:
Code: Select all
#include <stdio.h>
#include <wand/MagickWand.h>
int main()
{
MagickWand *wand;
MagickWandGenesis();
wand = NewMagickWand();
MagickReadImage(wand, "magick:rose");
MagickSetImageColorspace(wand, GRAYColorspace);
MagickWriteImage(wand, "test_gray.png");
wand = DestroyMagickWand(wand);
MagickWandTerminus();
return 0;
}
Code: Select all
$ identify -verbose test_gray.png | grep Colorspace
Colorspace: RGB