Method CopyPixelsTo
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
CopyPixelsTo(nint, long)
Copies this matrix's row data into an unmanaged buffer that has its own row stride, such as a UI framework's bitmap buffer. Handles submatrices and non-continuous matrices correctly. Performs no pixel-format conversion; convert the channel layout beforehand (e.g. via Cv2.CvtColor) if the destination expects a different channel order or count.
public void CopyPixelsTo(nint dst, long dstStep)
Parameters
dstnintPointer to the first byte of the destination buffer.
dstSteplongNumber of bytes between the start of consecutive rows in the destination buffer. May be negative for bottom-up buffers (e.g. a negative-stride GDI+
BitmapData), in which casedstmust still point at row 0.
Exceptions
- ArgumentException
dstis a null pointer, this matrix has more than 2 dimensions, or the magnitude ofdstStepis smaller than the row byte width of this matrix.