gpt4 book ai didi

java - 如何修复图像裁剪的放大尺寸?

转载 作者:行者123 更新时间:2023-12-01 04:54:11 25 4
gpt4 key购买 nike

我想修复图像裁剪的放大尺寸。如何做到这一点?我找到了很多并尝试了很多,但仍然无法获得正确的解决方案。裁剪后的图像放大太多并变得模糊。请有人帮助我解决这个问题。我的代码是。

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

最佳答案

尝试这样

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

检查这个link

关于java - 如何修复图像裁剪的放大尺寸?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14437594/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com