Conversation
Maximize (normalize) image contrast while preserving image tone. (Mimics Photoshop autocontrast functionality as opposed to the default PIL implementation, which operates on channels separately).
|
Please could you add tests for this? Docs would be very welcome too. |
|
Not quite sure what you're looking for in terms of docs, but I added "while preserving image tone" to a copy of the autocontrast docstring. |
|
Changes Unknown when pulling 93e6c08 on broxeph:master into * on python-pillow:master*. |
|
The tests that were added do show that it doesn't crash, but don't validate correctness. Possible Additional tests:
|
|
I've added some tests here (wiredfool@bb3ad27) for correctness of implementation, and I'm seeing some really strange behavior for running against a constant color image. If all pixels are white, it returns a white image. (127, 255,0) returns the same. But (127,127,127) returns an image that's (127, 255, 255), and an all black image returns (0,255,255). I don't think that this is intended behavior. |
|
I'll close this because there's been no progress in 3-4 years. Ping if you'd like to re-open it, or create a new PR. Thanks! |
|
An alternative to this, #5350, has been merged |
Maximize (normalize) image contrast while preserving image tone. (Mimics
Photoshop autocontrast functionality as opposed to the default PIL
implementation, which operates on channels separately).