gray scale image with Magick++ API
Li Lirong <[email protected]>
| Newsgroups | gmane.comp.video.image-magick.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I tried to convert color images to gray images with the following code:
Magick::Image image;
image.read("color.jpg");
image.colorSpace(GRAYColorspace);
image.write("gray.jpg");
The resulted image seems to be exactly as the original image. What's
wrong with my code?
Thank you for your help in advance.
I also tried this without success:
Magick::Image image;
image.read("color.jpg");
image.monochrome(true);
image.write("gray.jpg");
Best regards!