Closed walter-weinmann closed 2 years ago
Leptonica does not support compressed bmp files, in either reading or writing. There are at least three reasons for this: (1) Compression and decompression of the image data would probably require using a bmp library, and we are always working to avoid dependencies on new libraries. All code for bmp reading and writing is in bmpio.c. (2) With uncompressed data, we know exactly how big the data is, and this is used to guard against invalid or dangerous bmp files. (3) Most bmp files are made without compression, and if you want lossless compression, there are good alternatives with png and tiff libraries.
Thank you very much for the detailed explanations. I now use Microsoft Paint so that the bmp files are uncompressed.
I'm running the latest binary version of Tesseract OCR on Ubuntu:
With this
bmp
file here I get the following error message:Error in pixReadMemBmp: cannot read compressed BMP files Error in pixReadStream: bmp: no pix returned Error in pixRead: pix not read Error during processing.