适当调整图像大小

时间:2018-06-28 22:08:49

标签: java android image image-processing image-preprocessing

我使用android相机捕获图像,并保存为位图。

Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                startActivityForResult(i, CAMERA_CODE);
if(requestCode == CAMERA_CODE){
        Bundle b = data.getExtras();
        Bitmap bmp = (Bitmap)b.get("data");
//I changed the bitmap from immutable to mutable somewhere here
mutableBitmap = Bitmap.createScaledBitmap(mutableBitmap, widthOfscreen, heightOfScreen, false);
        cropView.setBitmap(mutableBitmap);
    }

问题在于位图很小,我想要更大的东西。仅仅是我的代码的结果是存在某些像素化区域或本能,结果与原始图像不匹配。

0 个答案:

没有答案