I am trying to scale down a Bitmap but the edges are not clear as the original image, its little blurred
I have checked out the below link
Bad image quality after resizing/scaling bitmap
Please help
 Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0,data.length);
           Matrix m=new Matrix();
           m.postRotate(90);
           //m.postScale((float)0.5,(float) 0.5);
           //Added for merging
           //Bitmap mutableBitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true);
           Bitmap mutableBitmap = Bitmap.createBitmap(bitmap,0,0,600,400,m,false);
           Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG);
           Canvas canvas = new Canvas(mutableBitmap);
           View v=(View)relLay.getParent();
           v.setDrawingCacheEnabled(true);
           v.buildDrawingCache();
           Options options = new BitmapFactory.Options();
           options.inScaled = false;
           //options.inJustDecodeBounds=true;
           options.inSampleSize=2;
           //Bitmap viewCapture = v.getDrawingCache().copy(Bitmap.Config.ARGB_8888, true);
          // Bitmap newImage = Bitmap.createScaledBitmap(viewCapture, viewCapture.getWidth()/2, viewCapture.getHeight()/2, true);
           ByteArrayOutputStream stream = new ByteArrayOutputStream();
           (v.getDrawingCache().copy(Bitmap.Config.ARGB_8888, true)).compress(Bitmap.CompressFormat.PNG, 100, stream);
           byte[] byteArray = stream.toByteArray();
           Bitmap viewCapture= BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, options);
           v.setDrawingCacheEnabled(false);
           Rect src = new Rect(0, 0, viewCapture.getWidth(), viewCapture.getHeight());
           Log.d("TEST",""+viewCapture.getWidth()+" "+viewCapture.getHeight());
           //Destination RectF sized to the camera picture
            Rect dst = new Rect(0, 0, mutableBitmap.getWidth(), mutableBitmap.getHeight());
            Log.d("Test",""+mutableBitmap.getWidth()+" "+mutableBitmap.getHeight());
            canvas.drawBitmap(viewCapture, src, dst, paint);
           // Bitmap newImage = Bitmap.createScaledBitmap(viewCapture, 400,600, true);
            mutableBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
The viewCapture element gets blurred out if I try to scale
 
     
    