Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliessolved.tooltip
Finally I got the next code which solves my problem:func nalaFilter() -> UIImage? {
let brownColor = CIColor (red: 128.0/255.0, green: 0.0, blue: 0.0)
let brownRect = CGRect (origin: .zero, size: self.size)
//Colored image
UIGraphicsBeginImageContextWithOptions(brownRect.size, true, 0.0)
brownColor.setFill()
UIRectFill(brownRect)
let brownColoredImage = UIGraphicsGetImageFromCurrentImageContext()
let brownContext = UIGraphicsGetCurrentContext()
brownContext!.setFillColor(UIColor.white.cgColor)
brownContext!.fill(brownRect)
self.draw(in: brownRect, blendMode: .normal, alpha: 1)
brownColoredImage?.draw(in: brownRect, blendMode: .colorDodge, alpha: 1)
let outBrown0Image = UIGraphicsGetImageFromCurrentImageContext()
//Multiplied image
self.draw(in: brownRect, blendMode: .normal, alpha: 1)
outBrown0Image?.draw(in: brownRect, blendMode: .multiply, alpha: 1)
let outBrownImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return outBrownImage
}This gets exactly the same result than my Android one.