更改从图库中选取的图像的大小
我想更改从照片库中选择的图像的大小。是否可以?我得到的图像尺寸为 (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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您不想更改实际图像,而只想更改其显示方式,则可以将图像按原样放入 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.