photon icon indicating copy to clipboard operation
photon copied to clipboard

Gamma correction

Open osman-turan opened this issue 3 years ago • 2 comments

At planned features, the gamma correction is listed. At the same time, the codebase has a commented-out piece of code for gamma correction. See: https://github.com/silvia-odwyer/photon/blob/475562b1e6594b994a32921f4f524138b648738e/crate/src/colour_spaces.rs#L10-L50

I haven't checked the correctness of the commented-out function. Why is it commented-out? What's the expectation and plan for the gamma correction? I can work on this feature if you like.

osman-turan avatar Oct 03 '21 21:10 osman-turan

@osman-turan Hi Osman, Thanks for opening this issue and for your interest in working on a gamma correction function!

The current gamma correction code uses features in the image library that are now deprecated, namely accessing the data field of each pixel, hence why the code is commented out. As for the correctness of the algorithm, I haven't been able to test it due to the deprecated code, so it might be better to start a new function and work on the implementation there.

But that said, if you'd like to work on your own function or make use of the logic in this, it's completely up to you! 😄 Thanks again for the help, it's greatly appreciated!

silvia-odwyer avatar Oct 04 '21 00:10 silvia-odwyer

Thanks for the details! Due to rounding, there might be some edge cases at my implementation. If you encounter such inputs, please let me know so that I can work on a fix.

osman-turan avatar Oct 04 '21 02:10 osman-turan