/// <summary>
/// Sets the image to be used
/// </summary>
/// <param name="imageData">Image data buffer</param>
/// <param name="width">Image Width</param>
/// <param name="height">Image Height</param>
public void SetImage(byte[] imageData, int width, int height)
{
Debug.Assert(m_Handle != IntPtr.Zero, "Handle must not be nulled!");
if(m_Handle != IntPtr.Zero)
{
Color32[] colorBuffer = TesseractOCRUtility.ImageFlipVertical(imageData, width, height);
imageData = TesseractOCRUtility.Color32ToBytes(colorBuffer);
TesseractOCRBridge.SetImageData(m_Handle, imageData, width, height, BYTES_PER_PIXEL, BYTES_PER_PIXEL * width);
}
}