1

I am developing an app in android that will capture a photo and store in sqlite. The image size is 70 kb but i want to store that image with 35 kb size. But i can't get any idea for this. I tried the following code but without success.

int photo_width = bm.getWidth();
int photo_height = bm.getHeight();

photo_width = 260;
photo_height = 260;

Bitmap photobitmap = Bitmap.createScaledBitmap(bm,
    photo_width, photo_height, false);
patthoyts
  • 32,320
  • 3
  • 62
  • 93
kaveri Patel
  • 286
  • 1
  • 3
  • 10

1 Answers1

0

You can use Bitmap.compress() to produce a compressed version.

marcbest
  • 1,600
  • 1
  • 10
  • 15