I am trying to take screenshot of a view using getDrawingCache()
method. When it gives bitmap that bitmap have not the same quality which i can see on the application. Below is the code which i am using :
view.buildDrawingCache();
Bitmap cacheBitmap = view.getDrawingCache();
ByteArrayOutputStream streamOut = new ByteArrayOutputStream();
cacheBitmap.compress(Bitmap.CompressFormat.PNG, 100, streamOut);
byte[] bitmapDataArry = streamOut.toByteArray();
I already tried few stuff which i got from google and SO. Like this improve quality of getdrawingcache and improve quality of image. But still not getting the pure image quality. Can anyone have any suggestion about this or any else method for taking screenshot without loosing quality.