public void ColorDodgeBlendOp2() { var lhs = GetSourceImage("blend1.png"); var rhs = GetSourceImage("blend2.png"); var lhs_wrap = new BitmapWrapper(lhs); var rhs_wrap = new BitmapWrapper(rhs); var op = new ColorDodgeBlendOp(); op.Apply(rhs_wrap, lhs_wrap); Compare(lhs, "colordodgeblend2.png"); }
protected unsafe override void RenderLine(ISurface src, ISurface dest, Rectangle roi) { bac_adjustment.Render(src, dest, roi); blur_effect.Render(src, dest, roi); invert_effect.Render(dest, dest, roi); desaturate_op.Apply(dest, dest, roi); for (int y = roi.Top; y <= roi.Bottom; ++y) { var srcPtr = src.GetPointAddress(roi.X, y); var dstPtr = dest.GetPointAddress(roi.X, y); for (int x = roi.Left; x <= roi.Right; ++x) { var srcGrey = desaturate_op.Apply(*srcPtr); var sketched = color_dodge_op.Apply(srcGrey, *dstPtr); * dstPtr = sketched; ++srcPtr; ++dstPtr; } } }