更改从图库中选取的图像的大小

发布于 2024-11-14 22:52:05 字数 73 浏览 5 评论 0原文

我想更改从照片库中选择的图像的大小。是否可以?我得到的图像尺寸为 (320, 290),我想将图像尺寸更改为 (480, 320)。

I want to change the size of an image selected from the photo gallery. Is it possible? I'm getting an image sized (320, 290) and I want to change the image size to (480, 320).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那伤。 2024-11-21 22:52:05

如果您不想更改实际图像,而只想更改其显示方式,则可以将图像按原样放入 UIImageView 中,然后将该视图设置为您喜欢的任何大小。它看起来不太好,特别是当你改变纵横比时,但它可以完成工作。

If you don't want to change the actual image, but only how it appears, then you can plunk the image as-is in a UIImageView and then make that view any size you like. It won't look great, especially if you are changing the aspect ratio, but it does the job.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文