The CopyOpacity has been renamed to CopyAlpha in ImageMagick 7. But that is probably not what you want.
ImageMagick does some magic when the input image has no alpha channel and you compose with CopyOpacity/CopyAlpha. It uses the circle_mask as a mask for the image. The -alpha off forces this behavior (you can find a good explanation here: http://www.imagemagick.org/Usage/compose/#copyopacity. This means the command actually translates to this:
ImageMagick does some magic when the input image has no alpha channel and you compose with CopyOpacity/CopyAlpha. It uses the circle_mask as a mask for the image. The -alpha off forces this behavior (you can find a good explanation here: http://www.imagemagick.org/Usage/compose/#copyopacity. This means the command actually translates to this:
using (MagickImage img= new MagickImage("infilegif")) { using (MagickImage mask = new MagickImage("circle_mask.png")) { using (MagickImage outfile = new MagickImage(MagickColor.Transparent, img.Width, img.Height)) { img.Mask = mask; outfile.Composite(img, Gravity.Center, CompositeOperator.SrcOver); outfile.Write("outfile.png"); } } }