SetBitmapBits Method of the TrainingImage Object

This method sets the training image data from the buffer in memory.

The image should be isotropic (that is its horizontal resolution should be equal to the vertical one), black-and-white with 1 bit per pixel encoding.

Image is stored in buffer continuously, line-by-line, from top to bottom. One line of black-and-white image is stored as a sequence of at least N = ceil ( width / 8 ) bytes. Each byte encodes colors of 8 adjacent pixels, most significant bit of the first byte corresponds to leftmost pixel of the line. Bit value of 0 denotes white pixel, value of 1 denotes black pixel. If width is not a multiple of 8, least significant bits of N-th byte are ignored.



HRESULT SetBitmapBits(
  int     Height,
  int     Width,
  __int64 RawDataPointer


void SetBitmapBits(
  int   Height,
  int   Width,
  Int64 RawDataPointer

Visual Basic .NET

Sub SetBitmapBits( _
  Height As Integer, _
  Width As Integer, _
  RawDataPointer As Int64 _


[in] Specifies the height of the training image in pixels.
[in] Specifies the width of the training image in pixels.
[in] This parameter is treated as a handle to memory buffer containing image data. The handle is passed as __int64.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.


The image data should exist while the corresponding TrainingImage object exists.


C# code

See also


24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.