Traditionally, transferring image data between Accusoft components requires passing the image data in a DIB format. Here's an example of such a data transfer using ImageGear:
// Load the image using ImageGear HIGEAR hIGear;
AT\_UINT fileSize = 0;
AT\_ERRCOUNT nErrCount = IG\_load\_file(inputFilenameBuffer, &hIGear);
if (nErrCount > 0) {
exit(1);
}
// Calculate the footprint of the BMP export nErrCount = IG\_fltr\_save\_mem\_size\_calc(hIGear, 0, 0, IG\_SAVE\_BMP\_UNCOMP, 1, 0, &fileSize);
if (nErrCount > 0) {
exit(2);
}
// Export the BMP char\* dataBuffer = (char\*)malloc(fileSize);
nErrCount = IG\_fltr\_save\_mem(hIGear, dataBuffer, 0, fileSize, IG\_SAVE\_BMP\_UNCOMP, 1, true, &fileSize);
if (nErrCount > 0) {
exit(2);
}
/\* ... \*/
// Analyze Barcode using a 14-bytes offset to skip BMP file header BX\_AnalyzeParameters params = BX\_DefaultAnalyzeParameters;
BX\_AnalyzeResult result;
BX\_Status status;
status = BX\_analyze\_dib(¶ms, dataBuffer + 14, &result);
free(dataBuffer);
IG\_image\_delete(hIGear);