toRawBuffer method

void toRawBuffer(
  1. PixelFormat pixelFormat,
  2. ImageBuffer buffer
)

Copies image pixels in the specified format into a buffer.

param pixelFormat The pixel format. param buffer Buffer that receives the raw image data. throws FaceException An error has occurred during Face Library execution.

Implementation

void toRawBuffer(PixelFormat pixelFormat, ImageBuffer buffer) {
  var err = faceSDK.id3FaceImage_ToRawBuffer(_pHandle.value, pixelFormat.value, buffer.handle);
  if (err != FaceError.success.value) {
    throw FaceException(err);
  }
}