بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
افت کیفیت بعد کراپ کردن تصویر موقع نمایش چرا؟!
سلام.
افت کیفیت بعد کراپ کردن تصویر موقع نمایش چرا؟!
private void performCrop(String picUri) {
try {
//Start Crop Activity
Intent cropIntent = new Intent("com.android.camera.action.CROP");
// indicate image type and Uri
File f = new File(picUri);
Uri contentUri = Uri.fromFile(f);
cropIntent.setDataAndType(contentUri, "image/*");
// set crop properties
cropIntent.putExtra("crop", "true");
// indicate aspect of desired crop
cropIntent.putExtra("aspectX", 1200);
cropIntent.putExtra("aspectY", 800);
// indicate output X and Y
cropIntent.putExtra("outputX", 450);
cropIntent.putExtra("outputY", 300);
// retrieve data on return
cropIntent.putExtra("return-data", true);
//cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, picUri);
startActivityForResult(cropIntent, 3);
}
// respond to users whose devices do not support the crop action
catch (ActivityNotFoundException anfe) {
// display an error message
String errorMessage = "your device doesn't support the crop action!";
Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);
toast.show();
}
}
اینم واسه نمایشش
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode==1 && resultCode==RESULT_OK && data!=null){
/*Uri img =data.getData();
Log.i("Uri","Uri is : " + img);
String[] af={MediaStore.Images.Media.DATA};
Cursor cu = getContentResolver().query(img, af, null, null, null);
cu.moveToFirst();
int ci=cu.getColumnIndex(af[0]);
path = cu.getString(ci);
cu.close();
imgView.setImageBitmap(BitmapFactory.decodeFile(path));
Toast.makeText(App.currentActivity,path,Toast.LENGTH_LONG).show();*/
Bundle extras = data.getExtras();
Bitmap image = extras.getParcelable("data");
imgView.setImageBitmap(image);
}
}
0
0
لینک (9 سال پیش)
0
0
چیزی نفهمیدم ازش (9 سال پیش)
0
0
دوستان کسی نمیدونه باید چیکار کنم؟من بعد از کراپ کردن تصویر باید تو سرور اپلودش کنم اونو بلدم اما الان مشکل افت کیفیت تصویر هستش (9 سال پیش)
برای این سوال پاسخی وجود ندارد.
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .