ビットマップを縮小しようとしていますが、元の画像のようにエッジが明確ではなく、少しぼやけています
以下のリンクをチェックアウトしました
助けてください
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);
拡大縮小しようとすると、viewCapture 要素がぼやけてしまう