UIGraphicsBeginImageContext(imageSize)
原图
self.draw(in:CGRect(x:0, y:0, width:imageSize.width, height:imageSize.height))
水印图片
waterMarkImage.draw(in:markFrame, blendMode: .normal, alpha: alpha)
最终图片
let waterMarkedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
网友评论