private void UnlockBitmap() { // Copy the RGB values back to the bitmap and unlock the bitmap. this.bitmap.UnlockBits(this.bitmapData); this.bitmapData = null; this.pixelBase = null; }