MagickSeparateImageChannel
Posted: 2014-08-06T06:12:14-07:00
Hi, I'm trying to convert a simple command line SR.png -channel RGBA -separate SR_%d.png to a MagickWand program.
When I compare the output files from the command line to the MagickWand program, I can see they are different. I guess I miss something but I can't figure out what.
Thanks for helping!
PS: Sorry, I posted here first in the MagickWand forum...
Code: Select all
mw_logo = NewMagickWand();
status = MagickReadImage(mw_logo, argv[2]); // read logo
if (status == MagickFalse)
ThrowWandException(mw_logo);
mw_r = CloneMagickWand(mw_logo);
mw_g = CloneMagickWand(mw_logo);
mw_b = CloneMagickWand(mw_logo);
mw_a = CloneMagickWand(mw_logo);
MagickSeparateImageChannel(mw_r, RedChannel);
MagickSeparateImageChannel(mw_g, GreenChannel);
MagickSeparateImageChannel(mw_b, BlueChannel);
MagickSeparateImageChannel(mw_a, AlphaChannel);
MagickWriteImage(mw_r, "/tmp/SRr.png");
MagickWriteImage(mw_g, "/tmp/SRg.png");
MagickWriteImage(mw_b, "/tmp/SRb.png");
MagickWriteImage(mw_a, "/tmp/SRa.png");
Thanks for helping!
PS: Sorry, I posted here first in the MagickWand forum...