Method CopyPixelsFrom
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
CopyPixelsFrom(nint, long)
Copies row data from an unmanaged buffer that has its own row stride into this matrix. Performs no pixel-format conversion; the source buffer must already match this matrix's channel layout (convert with Cv2.CvtColor after the copy if it doesn't).
public void CopyPixelsFrom(nint src, long srcStep)
Parameters
srcnintPointer to the first byte of the source buffer.
srcSteplongNumber of bytes between the start of consecutive rows in the source buffer. May be negative for bottom-up buffers (e.g. a negative-stride GDI+
BitmapData), in which casesrcmust still point at row 0.
Exceptions
- ArgumentException
srcis a null pointer, this matrix has more than 2 dimensions, or the magnitude ofsrcStepis smaller than the row byte width of this matrix.