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

New Post: Hard Mix question

$
0
0
Hi,
Is there a difference in the way Magick.NET (or ImageMagick) processes a HardMix composite in comparison to Photoshop?
If I take the following blue and red channels in photoshop and apply Hard Mix to the first layer (layers can be in either order) I get the following result:

Blue channel:
Image
TEXT

Red channel
Image
TEXT

Photoshop Hard Mix result
Image
TEXT


However, when I try the same in Magick.NET, the result is a completely black image:
Image
TEXT

My code is as follows:
            List<MagickImage> imgs = new List<MagickImage>();
            MagickImage img = new MagickImage(Path.Combine(testCollectionPath, Path.GetFileName(fileName)));

            int i = 0;
            foreach (MagickImage channel in img.Separate(Channels.RGB))
            {
                imgs.Add(channel);
                i++;
            }

            MagickImage chRed = imgs[0];
            MagickImage chBlue = imgs[2];

            MagickImage chProc = chBlue.Clone();

            chProc.Composite(chRed, CompositeOperator.HardMix);
            imgs.Add(chProc);

            return imgs;
I think the structure of the code is basically correct as I've managed to get other composite functions working with it.

Does anyone have any suggestions as to what might be occurring or how I might better emulate the Photoshop version of hard mix please?

Thanks in advance,
Stu


*Edit: Sorry, image code didn't seem to work with dropbox links

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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