Cropped Image size in Android is constant

自古美人都是妖i 提交于 2019-12-04 19:24:14
Rahul Parsani

Didn't know this was the issue when I answered the your earlier question. I believe the answer you are looking for should be:

intent.setData(mImageCaptureUri);
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", false);

Make sure you set the parameter scale to false. It defaults to true.

PS Since Android is open source and the camera + crop app is a part of the OS, all I am doing is reading the source. The file you should be looking at is here. Check out variable mScale to see how the parameter is being used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!