gpt4 book ai didi

android - ACTION_IMAGE_CAPTURE 返回图像质量差的位图,我在哪里可以获得高分辨率图像?

转载 作者:行者123 更新时间:2023-11-29 16:39:51 24 4
gpt4 key购买 nike

<分区>

我希望在 ImageView 中显示高质量的图像并上传到服务器。我已经在互联网、StackOverflow 和 GitHub 上进行了搜索,但找不到答案,也许有人知道如何解决这个问题?

protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) { //work android
super.onActivityResult(requestCode, resultCode, imageReturnedIntent);
imageReturnedIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);//try

if (resultCode == RESULT_OK ) {// work every android than need click OK
//working
Uri selectedImage = imageReturnedIntent.getData();//convert to for bitmap that can send
Bundle extras = imageReturnedIntent.getExtras();//finish converting and copy the image
bitmap = extras.getParcelable("data");//receive image to bitmap
imageView.setImageBitmap(bitmap);

onCreate:

btnCamera.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(intent, 0);
}
});

这里有什么问题吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com