I have a bunch of CIFilter
s that finally scale & crop the large image (from iPhone camera) to an 1080x1920 CIImage
.
I then want to save the image as a JPG:
var outputFilter: CIFilter?
...
if let ciImage = outputFilter?.outputImage {
let outputImage = UIImage(ciImage: ciImage)
let data = outputImage?.jpegData(compressionQuality: 0.8)
...
}
The ciImage.extent
is 1080x1920, outputImage.size
is also 1080x1920, outputImage.scale
is 1.0.
The image saved to disk however is 3x as large: 3240x5760.
What am I missing?