我有一个程序可以拍摄图像并裁剪掉除了一个细长矩形以外的所有内容。新图像的尺寸类似于500x150。如何在不缩放的情况下让UIImageView显示整个图像?
func putOnImageView(image:UIImage) {
let cgImage = CGImageCreateWithImageInRect(oldImage.CGImage,CGRect(0,0,500,150)
let image = UIImage(CGImage: cgImage!, scale:0, orientation: oldImage.imageOrientation)
imageView.frame = CGRect(0,0,50,50)
imageView.image = image
}