'CIColorControls wrong brightness
I am change brightness value of the image to negative value and trying to compare result image with apple photo editor.
Original
Edited by me
Edited by Apple Photo Editor
As you can see, my CIFilter change brightness of white part of the image too. Apple Editor changes brightness of person only.
My code is simple:
filter.setValue(NSNumber(value: -0.4), forKey: kCIInputBrightnessKey)
It makes no difference whether I increase the brightness or decrease it. The brightness of the entire image changes. Apple Editor changes only part of the image
Solution 1:[1]
The "Brightness" slider in Photos is not mapped to the "traditional" brightness value (that is used in CIColorControls
). Apple uses more sophisticated algorithms under the hood that, among others, take the image's content into account. I'm afraid there's no single core image filter that can reproduce that result. But it looks like Photos also increased the contrast when reducing the brightness, so you could try that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Frank Schlegel |