-1
このような画像を編集、回転、サイズ変更できるチタン製のAndroidモジュールがありますか?チタンAndroidモジュール:クロップ、回転、サイズ変更...画像
このような画像を編集、回転、サイズ変更できるチタン製のAndroidモジュールがありますか?チタンAndroidモジュール:クロップ、回転、サイズ変更...画像
これはcamera.action.CROPです:
//STARTS CROPPING INTENT
Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(Uri.fromFile(savedPicture), "image/*");
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, CROP_PICTURE);
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CROP_PICTURE)
{
// SAVE PICTURE TO FILESYSTEM
Bundle extras = data.getExtras();
Bitmap croppedPicture = extras.getParcelable("data");
File pictureFolder = RouterApplication.getInstance().getPictureDirectory();
File picture = null;
FileOutputStream fOut = null;
try
{
picture = new File(pictureFolder, "a.jpg");
if (croppedPicture != null)
{
fOut = new FileOutputStream(picture);
croppedPicture.compress(Bitmap.CompressFormat.JPEG, 90, fOut);
}
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
}
はご提案をいただき、ありがとうございます。 私はAndroidの意図を使ってチタンで試しました。これは私が使用したコードです:[Titanium working code](http://ctrlv.it/javascript/6212/1237089225) Androidバージョン<6で動作するようです。 Android 6(API = 23)では、このエラーが表示されます。[Android 6エラー](http://ctrlv.it/txt/6209/2878359207) – astrovicApps
メディアを最初にメディアストレージに保存する必要があります。とにかくdownvoteのおかげで... あなたの質問とより多くのspeshificようにしてください – Erythrozyt
返信いただきありがとうございます。私はすでにファイルを自分のデバイスに保存しようとしていましたが、その後、トライします。しかし、それは同じエラーを表示します...それはuriが間違っていたかのようですが、uriは正しいです。奇妙なことは、Android API 23でのみ発生します。私はまた、メモリとカメラへのアクセス許可を追加... PS:私はdownvoteを置いていない、誰かが私の質問に-1を置く... – astrovicApps