裁剪正方形图片Android的形状在应用程序 [英] Cropping Shape of Square Image Android In App
本文介绍了裁剪正方形图片Android的形状在应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个应用程序,允许用户调整图像在正方形的形状(长度=宽度)。
I want to create an application which allows the user to resize an image in shape of square (length = width).
我知道,它可以使用该库,使以这种方式:
I know that it is possible to use the gallery to make that in this way:
private void crop(Uri photoUri) {
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setData(photoUri);
intent.putExtra("outputX", 200);
intent.putExtra("outputY", 200);
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", true);
intent.putExtra("return-data", true);
startActivityForResult(intent, RESULT_CROP);
}
但是,我想知道是否有一个图书馆,让进行了直接在应用程序?
感谢你在前进!
推荐答案
我发现我的解决方案这里但我接受其他的答案! !
I found my solution here but I accept other answers!!
这篇关于裁剪正方形图片Android的形状在应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文