首页 > 解决方案 > 如何在不由用户更改的情况下在 android 裁剪意图中指定高度/宽度?

问题描述

我将 outputX/outputY 更改为 100 x 和 y,然后更改为 1000/1000 x 和 y,但没有什么不同,只是分辨率改变了

Intent getImage = new Intent(Intent.ACTION_GET_CONTENT);
getImage.setType("image/png");
doesImageChosen = true;
getImage.putExtra("crop", true);
getImage.putExtra("aspectX", 1000);
getImage.putExtra("aspectY", 1000);
getImage.putExtra("scaleUpIfNeeded", true);
getImage.putExtra("outputX", 1000);
getImage.putExtra("scale", true);
getImage.putExtra("outputY", 1000);

标签: javaandroidandroid-studioandroid-intentandroid-gallery

解决方案


推荐阅读