private WriteableBitmapImageSource(WriteableBitmap wbm) { this.wbm = wbm; this.w = wbm.PixelWidth; this.h = wbm.PixelHeight; this.nc = GetNumberOfComponents(wbm.Format); this.rb = GetRangeBits(wbm.Format); this.DefineHelpers(wbm.Format); }