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 DocumentException An error has occurred during Document Library execution.

Implementation

void toRawBuffer(PixelFormat pixelFormat, ImageBuffer buffer) {
  var err = documentSDK.id3DocumentImage_ToRawBuffer(_pHandle.value, pixelFormat.value, buffer.handle);
  if (err != DocumentError.success.value) {
    throw DocumentException(err);
  }
}