> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenBitmap Method of the Engine Object

<Warning>
  This method is implemented in FRE for Windows.
</Warning>

This method opens the specified bitmap image (HBITMAP).

## Syntax

### C++

```cpp theme={null}
HRESULT OpenBitmap(
  __int64            BitmapHandle,
  int                XResolution,
  int                YResolution,
  IPrepareImageMode* PrepareMode
  IImageDocument**   Result
);
```

### C\#

```csharp theme={null}
IImageDocument OpenBitmap(
  Int64             BitmapHandle,
  int               XResolution,
  int               YResolution,
  IPrepareImageMode PrepareMode
);
```

### Visual Basic .NET

```vb theme={null}
Function OpenBitmap( _
  BitmapHandle As Int64, _
  XResolution As Integer, _
  YResolution As Integer, _
  [PrepareMode As IPrepareImageMode = Nothing] _
) As IImageDocument
```

## Parameters

BitmapHandle

\[in] Specifies the handle of the GDI object (HBITMAP). This handle should be available to the process that operates ABBYY FineReader Engine. The handle is passed as [\_\_int64](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties).

XResolution

\[in] Specifies the horizontal resolution of the bitmap.

YResolution

\[in] Specifies the vertical resolution of the bitmap.

PrepareMode

\[in] Refers to the [PrepareImageMode](/fine-reader/engine/api-reference/image-related-objects/prepareimagemode) object that stores parameters for bitmap conversion in internal format. This parameter may be 0 in which case default parameters of the image preparation mode are used, or, if a [profile](/fine-reader/engine/guided-tour/advanced-techniques/working-with-profiles) has been loaded, the parameters set by this profile are used.

Result

\[out, retval] A pointer to IImageDocument\* pointer variable that receives the interface pointer to the resulting [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument) object.

## Return values

Windows: This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

Linux and macOS: This method returns E\_NOTIMPL.

## Remarks

This method does not work if the Engine is loaded as an out-of-process server in Linux or if the object is created using the [OutprocLoader](/fine-reader/engine/api-reference/engine-loaders/outprocloader) object in Windows.

See also

[Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface)

[PrepareBitmap](/fine-reader/engine/api-reference/engine-object-iengine-interface/processing-methods/preparebitmap-method)
