public NPPImage_8uC3(int nWidthPixels, int nHeightPixels)
{
_sizeOriginal.width = nWidthPixels;
_sizeOriginal.height = nHeightPixels;
_sizeRoi.width = nWidthPixels;
_sizeRoi.height = nHeightPixels;
_channels = 3;
_isOwner = true;
_typeSize = sizeof(byte);
_devPtr = NPPNativeMethods.NPPi.MemAlloc.nppiMalloc_8u_C3(nWidthPixels, nHeightPixels, ref _pitch);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}, Pitch is: {3}, Number of color channels: {4}", DateTime.Now, "nppiMalloc_8u_C3", res, _pitch, _channels));
if (_devPtr.Pointer == 0)
{
throw new NPPException("Device allocation error", null);
}
_devPtrRoi = _devPtr;
}