简体   繁体   English

如何固定图像裁剪的缩放比例?

[英]How to fix the zoom in size for image cropping?

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);

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 检查此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM