2

hello guys i'm having a problem with scaling an image to square size. 612 * 612

first i'm getting the image as cache from the imageview and then i'm converting it to Bitmap image.

    view.setDrawingCacheEnabled(true);
    view.buildDrawingCache();
    save = view.getDrawingCache();

then i'm using Bitmap.createScaledBitmap as below

     Bitmap a = Bitmap.createScaledBitmap(save, 612, 612, true);

it works as i want it but when the image scaled it lose its quality

here is how i compress the image to save it / share it

        a.compress(Bitmap.CompressFormat.PNG, 100, out);

i'm sharing it through my application to Instagram to fit inside instagram cropping tool but the image always will be low quality. can anyone tell me how do i scale / resize the image dimension without losing its quality or to fit inside instagram cropping tool without losing quality. thanks

Kosh
  • 6,140
  • 3
  • 36
  • 67

0 Answers0