从Uri压缩图像

时间:2018-10-11 19:22:15

标签: java android image-compression

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
        CropImage.ActivityResult result = CropImage.getActivityResult(data);
        if (resultCode == RESULT_OK) {
            imageUri = result.getUri();
            storageReference.putFile(imageUri);
        }
    }
}

如何从Uri压缩图像?我不想将其压缩到Bitmap或存储在设备上并从那里检索。还有其他办法吗?

0 个答案:

没有答案