Saved Bitmap Is Black
I created a bitmap with text and I can view it in an Imageview, but when I save the Bitmap I only get a black image. I have spend three hours looking at similar questions but none
Solution 1:
JPEG
Image has a black background by default, so if your text color is also black you will get a black image. If your image has no background color, you must save it as PNG
. Change as following and have a try:
LabelBitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
to:
LabelBitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes);
Post a Comment for "Saved Bitmap Is Black"