これが画像を不適切に表示する理由を誰かが説明できますか:
var image = UIImage(named: "test-pattern.jpg")
let ciImage = CIImage(image: image)
myUIImageView.image = UIImage(CIImage: ciImage)
しかし、これはしません:
var image = UIImage(named: "test-pattern.jpg")
var ciImage = CIImage(image: image)
UIGraphicsBeginImageContext(CGSizeMake(ciImage.extent().size.height,ciImage.extent().size.width))
var testUIImage = UIImage(CIImage: ciImage)
testUIImage?.drawInRect(CGRectMake(0, 0, ciImage.extent().size.height, ciImage.extent().size.width))
let finalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext()
var image = UIImage(named: "test-pattern.jpg")
let ciImage = CIImage(image: image)
これは本来のやり方ですか、それとももっと効率的に達成できますか?