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

New Post: Get Only Diff

$
0
0
Hi dlemstra,

Thanks again for the earlier help, I would like to know if I had done this right or not.
The below code which is done through command prompt is done this way.

compare.exe -metric AE -fuzz 7.5% D:\test\image1.jpg D:\test\image2.jpg D:\test\result.jpg

So, is the below code what I have written is similar to the one above?
using (MagickImage image1 = new MagickImage(@"D:\test\image1.png"))
{
  using (MagickImage image2 = new MagickImage(@"D:\test\image2.png"))
  {
                    using (MagickImage diffImage = new MagickImage())
                    {
                        image1.ColorFuzz = new ImageMagick.Percentage(7.5);
                        image2.ColorFuzz = new ImageMagick.Percentage(7.5);
                        image1.Compare(image2, ErrorMetric.Absolute, diffImage);
                        diffImage.Write("@D:\test\result.png");
                    }
}
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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