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

New Post: CompositeOperator enum

$
0
0
So it turns out that I still am having a little problem with this. It worked great on a mask that was On/Off values, but with a variable mask my result is a lot different from IM 6, which may be correct but not what I'm after. Here are my samples, any idea on what I could do different? Thanks for any input you may have.

IM 6 command line -

convert alphatemp1.png alphatemp2.png -alpha off -compose copy_opacity -composite final_im6.png

Magick.Net code

 using (MagickImage img = new MagickImage(TempFile1))
            {
                using (MagickImage mask = new MagickImage(TempFile2))
                {
                    using (MagickImage outfile = new MagickImage(MagickColor.Transparent, img.Width, img.Height))
                    {
                        img.Mask = mask;
                        outfile.Composite(img, 0,0 , CompositeOperator.SrcOver);
                        outfile.Write("final.png");
                    }
                }
            }
Input Image
Image
Mask Image
Image

IM6 copy_opacity output
Image

Magick.Net output (you can't tell the difference as much on the web page, but in a view that shows transparent you can really see how much additional artifact is left)
Image

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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