Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Composite Multiply Gray Scaled Images

$
0
0
I'm trying to mimic auto white balance part from Fred's ImageMagick script with the latest version, but the result seems to be different from expected.
The mask created by composite operation is a RGB image instead of a gray scaled image.
What is causing the difference from command line behavior?
using (MagickImage mask = image.Clone())
{
    mask.ColorSpace = ColorSpace.HSB;
    mask.Negate(Channels.Green);

     using (MagickImage newMask = mask.Separate(Channels.Green).First())
     {
         using (MagickImage maskBlue = mask.Separate(Channels.Blue).First())
         {
             // Becomes a RGB image.
             newMask.Composite(maskBlue, CompositeOperator.Multiply);
         }
      }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>