OCR Xpress for Linux - Updated
OCRX_load_file
API Reference > OCR Xpress for Linux API Reference > Functions Reference > Image Handling Functions > OCRX_load_file

Loads a bitmap from file to a DIB.

Supports uncompressed bitmaps of the following bit depths:

Images that do not contain resolution information will be defaulted to 300 DPI resolution.

Arguments:

Name  Type  Description
filePath const char* Input file path.
dib const intptr_t* DIB retrieved from file.

Return Value:

OCRX_Status – Specifies whether an error occurred and, if so, specifies which error and any relevant details.

Example:

Copy Code
#include “ocrxpress.h”

intptr_t dib = 0;

OCRX_set_solution_name(“solutionName”);
OCRX_set_solution_key(0x00000001, 0x00000002, 0x00000003, 0x00000004);
OCRX_set_oem_license_key(“oemLicenseKey”);

OCRX_load_file(“/home/user/image.bmp”, &dib);
OCRX_free_dib(dib);