【发布时间】:2013-05-20 21:43:30
【问题描述】:
我创建了一个包含高分辨率图像的 UIImageView。问题是该图像的分辨率太高而无法放入 imageView。 imageView 的大小是 92 x 91(所以它很小)。它包含一个 UIImage,其分辨率太高,因此在 UIImageView 中看起来很难看。 那么如何降低 UIImage 的分辨率呢?
我的 UIImageView 代码:
UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:pngFilePath]];
myImageView.frame = CGRectMake(212.0, 27, 92,91);
【问题讨论】:
-
您对分辨率的定义是什么?它通常用作每单位的像素数。听起来您将其定义为图像的尺寸。
标签: ios objective-c