How to fix the zoom in size for image cropping?

2019-02-28 04:06发布

I want to fix the zoom in size for image cropping.How to do this?I found a lot and tried a lot but still not able to get the right solution yet.cropped image too much zoomed and getting blurre.Please someone help me for my this issue.my code is.

intent.putExtra("crop", "true");
        intent.putExtra("outputX", 300);
        intent.putExtra("outputY", 300);
        intent.putExtra("aspectX", 1);
        intent.putExtra("aspectY", 1);
        intent.putExtra("scale", false);
        intent.putExtra("return-data", true);

1条回答
【Aperson】
2楼-- · 2019-02-28 05:00

Try like this

intent.putExtra("outputX", 200); //Set this to define the max size of the output bitmap
intent.putExtra("outputY", 200); //Set this to define the max size of the output bitmap
intent.putExtra("aspectX", 1); //Set this to define the X aspect ratio of the shape
intent.putExtra("aspectY", 1); //Set this to define the Y aspect ratio of the shape

check this link

查看更多
登录 后发表回答