Carlos
Carlos

Reputation: 453

How to reduce the Bitmap size converting a Bitmap from 24 to 1bpp programatically in Android

I need to reduce the bitmap size converting it from 24bpp to 1bpp-monochrome in my OCR application in Android.

I found this very good piece of software that converts the Bitmap to 1bpp-monochrome (https://github.com/acdevs/1bpp-monochrome-android). It converts to 1bpp-monochrome but the final file does not have the size reduced.

Any suggestion in how to reduce the bitmap file size converting a bitmap to 1bpp-monochrome?

Thank you in advance for your help.

Upvotes: 0

Views: 327

Answers (1)

Carlos
Carlos

Reputation: 453

The code on https://github.com/acdevs/1bpp-monochrome-android is working 100% and creating a 1bpp Bitmap with reduced size. The problem is when reading this bitmap(1bpp) in the android environment you need to choose one Bitmap.Config and Android increases the Bitmap size accordingly the Bitmap.Config. Android does not support 1bpp bitmaps.

Upvotes: 0

Related Questions