I have been trying to save a bitmap as grayscale. The configurations provided by android to store single channel color seems to be only ALPHA_8
. When trying to save bitmap in ALPHA_8
as JPEG by calling Bitmap.compress
function, I get blank image. What is the correct way of saving grayscale image in android?
Please note that my concern is about storage requirement. I just want to save a single channel(grayscale) JPEG. Making R==G==B
in ARGB_888
format does make it grayscale but the color information saved by Bitmap.compress
still seems to be 3 channel.