且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将滤镜应用于UIImage时,结果颠倒了

更新时间:2023-02-01 17:46:57

将已过滤图像的图像方向和比例设置回原始值:

Set the image orientation and scale of the filtered image back to the original values:

let newImage = UIImage(CIImage:filter.outputImage, scale:self.image.scale, orientation:self.image.imageOrientation)