0

So I have this application and I take a screenshot of edited image and save it to bitmap. Like here:

 imv.setDrawingCacheEnabled(true);
 bm = imv.getDrawingCache();

And now I want to save this bitmap to device. How should I go about doing this? Is somehow converting said bitmap to table of bytes a good idea?

Undo
  • 25,519
  • 37
  • 106
  • 129
spockerrs
  • 11
  • 2

1 Answers1

0

You'll need a FileOutputStream with Bitmap.compress for that:

bitmap.compress(Bitmap.CompressFormat.PNG, 100, new FileOutputStream(filename + ".png"));
F43nd1r
  • 7,690
  • 3
  • 24
  • 62