- I have this line of code for taking screenshots I take the screenshot but somethimes the image only show a white backgroud and doesn't show the full color of the image how can I solve this?
- Postdata I have other question with the fullcode Problem with taking screenshots with the media projection android studio and I discover that the problem happened with this line of code.
bitmap = Bitmap.createBitmap(mWidth+rowPadding/pixelStride, mHeight, Bitmap.Config.ARGB_8888);
bitmap.copyPixelsFromBuffer(buffer);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
The problem is in the compression of your image.
Check out the link below