Based on this question asked by @ben75: Android : save a Bitmap to bmp file format
My question now is: How can I have a BMP image with the depth of 1 bit per pixel (Black & White)?
Bitmap bmpMonochrome = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmpMonochrome);
ColorMatrix ma = new ColorMatrix();
ma.setSaturation(0);
Paint paint = new Paint();
paint.setColorFilter(new ColorMatrixColorFilter(ma));
canvas.drawBitmap(bmpSrc, 0, 0, paint);
Like so! Source
Answering my own question...
After some tough search all over the web I realized I had to create 2 things: a bitmap black and white - and did that using the approach of making all 0's for colors below 128 and 255's for the rest, like this (this is C# code, as I'm using Xamarin to code my app):
Then get the byteArray of Monochrome image:
And finally create the bitmap "by hand" using the following variables and placing them into a FileOutputStream to save the file: