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

New Post: Composite ImageMagick equivalent in Magick.NET

$
0
0
I though the bug was solved in the last released, I will wait for your reply :)
As you could guess I'm a beginnner with ImageMagick, I am not using the '-set colorspace RGB' actually, the exact command line I am trying to translate into c# is this one :
convert imgInput.jpg ( -clone 0 -fill #330000 -colorize 100% ) ( -clone 0 -colorspace gray -negate ) -compose blend -define compose:args=100,0 -composite imgOutput.jpg
According to ImageMagick :
  • imgInput is the background (dest)
  • "-clone 0 -fill #330000 -colorize 100%" is the overlay (src)
  • "-clone 0 -colorspace gray -negate" is the mask
So the right syntax should be (to me):
            var dest = input.Clone();

            var src = input.Clone();
            src.Colorize(new MagickColor(hexaColor), new Percentage(100));

            var mask= input.Clone();
            mask.ColorSpace = ColorSpace.GRAY;
            mask.Negate();

            dest.ClipMask = mask;

            dest.Composite(src, Gravity.Center, CompositeOperator.Blend, "100,0");
            dest.Write("imgOutput.jpg");
I will wait for you and try to be helpful somehow :)
Good luck!!!

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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