Image Format Exception

Get this error when try recognition of image file stem.FormatException: 'Format is not supported. Only 24bpp or 32bpp images are expected’
I want to understand why de pixel format is limited to 24bpp or 32bpp. We have many scanners without this format. However, when I scan into PDF, the recognition works well; only in pdf there is no possibility of mass processing of files.



Can you please share your sample image along with the sample code snippet and other files? We will try to check the possibility to process it using Aspose.OMR and share our feedback with you.

here is my sample image et my omr file for test. (82.0 KB)
the code snippet is :
private void ReconizeTemplateB()
string temptah = @"…\Model_mk.omr";
string imgPath = @"…\bbbb0003.jpg";
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = omrEngine.GetTemplateProcessor(temptah);
Aspose.OMR.Model.RecognitionResult recognitionResult = templateProcessor.RecognizeImage(imgPath, 60);
string result = recognitionResult.GetCsv();


We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): OMRNET-921

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.


Yes, your Image is “1bppIndexed” which is not a supported PixelFormat at the moment.
We have plans to extend support to all Pixel formats, but it is not on immediate queue, and we are planning to add support for it not earlier than December 2023.

We recommend converting image to 16bpp or 24bpp using such tools as Microsoft.Paint\Gimp\Photoshop etc.