See the question and my original answer on StackOverflow

WPF's WriteableBitmap already wraps a WIC Bitmap undercovers, so performance of your code can be improved maybe more than you think but it's not exposed publicly unfortunately.

You can get to it with a code like this:

var writeableBitmap = new WriteableBitmap(200, 200, 96, 96, PixelFormats.Bgr32, null); // create some writeable bitmap

// get its internal COM reference
// PropertyInfo can be cached
var prop = writeableBitmap.GetType().GetProperty("WicSourceHandle", BindingFlags.NonPublic | BindingFlags.Instance);
var handle = (SafeHandleZeroOrMinusOneIsInvalid)prop.GetValue(writeableBitmap, null);

using (var bitmap = new SharpDX.WIC.Bitmap(handle.DangerousGetHandle())) // we're already walking on the dangerous edge anyway
{
    etc...
    // EndDraw does Lock+Unlock
}

Note 1: WPF is quite frozen now, so I don't think it's a big risk to use this internal structure but it's up to you obviously.

Note 2: working on a WIC bitmap is working on the CPU. If you want even better performance you can use a Direct2D bitmap which resides on the GPU and can take advantage of GPU power. Requires probably important changes.