public BitmapSource WeatheringNG(BitmapSource SourceImage, WeatheringParam param, bool Watermark)
        {
            Mat SourceMat = SourceImage.ToMat();

            if (SourceMat.Type() == MatType.CV_8UC1)
            {
                SourceMat = SourceMat.CvtColor(ColorConversionCodes.GRAY2BGRA);
            }
            if (Watermark)
            {
                AddWatermark(ref SourceMat, Watermark_Zhihu);
                AddWatermark(ref SourceMat, Watermark_Sina);
                AddWatermark(ref SourceMat, Watermark_Toutiao);
                AddWatermark(ref SourceMat, Watermark_Tieba);
            }

            if (param.Noise != 0.0)
            {
                Noising(ref SourceMat, param.Noise);
            }
            if (param.Green != 0.0)
            {
                Greening(ref SourceMat, param.Green);
            }
            if (param.AspectRatio != 1.0)
            {
                OpenCvSharp.Size size = new OpenCvSharp.Size(0, 0);
                SourceMat = SourceMat.Resize(size, param.AspectRatio, param.AspectRatio, InterpolationFlags.Area);
            }
            if (param.Quality != 0.0)
            {
                SourceMat = Compressing(SourceMat, param.Quality);
            }
            return(SourceMat.ToBitmapSource());
        }
        public BitmapSource WeatheringClassic(BitmapImage input, WeatheringParam param, bool Watermark)
        {
            Mat SourceMat = input.ToMat();

            if (SourceMat.Type() == MatType.CV_8UC1)
            {
                SourceMat = SourceMat.CvtColor(ColorConversionCodes.GRAY2BGRA);
            }

            if (Watermark)
            {
                AddWatermark(ref SourceMat, Watermark_Zhihu);
                AddWatermark(ref SourceMat, Watermark_Sina);
                AddWatermark(ref SourceMat, Watermark_Toutiao);
                AddWatermark(ref SourceMat, Watermark_Tieba);
            }

            if (param.Noise != 0.0)
            {
                Noising(ref SourceMat, param.Noise);
            }

            for (int iter = 0; iter < param.Green * 100; iter++)
            {
                Parallel.For(0, SourceMat.Height, (y, state) =>
                {
                    Parallel.For(0, SourceMat.Width, (x, state) =>
                    {
                        SourceMat.Set(y, x, SkiaYUV(SourceMat.Get <Vec3b>(y, x)));
                    });
                });
            }

            if (param.Quality != 0)
            {
                SourceMat = Compressing(SourceMat, param.Quality);
            }

            if (param.AspectRatio != 1)
            {
                OpenCvSharp.Size size = new OpenCvSharp.Size(0, 0);
                SourceMat = SourceMat.Resize(size, param.AspectRatio, param.AspectRatio, InterpolationFlags.Area);
            }

            return(SourceMat.ToBitmapSource());
        }