how to scan docs to disk as JPG file?

  • Last Post 11 October 2013
tufan posted this 09 October 2013


When scanning with ABBY SDK 9 in c#, it scans docs and creates tmp files which are 0 bytes size into target folder. But after scanning has finished, it show an error which says "unknown image format: (compression in memory)". I could not find any sample code or description about how to set scanned image format as JPEG. Thanks

Order By: Standard | Newest | Votes
SDK_support posted this 11 October 2013

In order to avoid the "Unknown image format: (Compression in memory)" message in ABBYY FineReader Engine 9 the only way is to switch off the compression during scanning of black and white images in driver of your scanner. If there is no possibility to switch off the compression in scanner settings please contact the developers of your scanner driver.

The image files created by ScanManager::Scan method after scanning are saved in one of the formats which is supported both by the scanner and ABBYY FineReader Engine (commonly it is BMP format). In order to create a JPEG format after scanning please do the following:

  1. scan paper documents;
  2. save the images to the ScanFolder folder and save the full path to the image files to the StringsCollection object by using the Scan method of the ScanManager object;
  3. get the image file names from this StringsCollection object and open the files as usual image files by using the methods of the Engine object, for example, OpenImage;
  4. write the image of the current image plane into an image file by means of ImageDocument::Image::WriteToFile method with ImageFileFormatEnum=IFF_JpegColorJfif parameter.

tufan posted this 11 October 2013


I have spent two days to solve this problem, but after your message, problem is solved. Lots of thanks for your support.

I have written a simple c# library and an c# app, which uses that library, scans docs to disk, converts them to jpeg files and makes OCR.