Thanks for sharing the answer once you figured it out! That’s probably gonna help a bunch of folks in the future with the same issue.
Since you’re using Images.jl anyway, you can also use the GammaCorrection via adjust_histogram like in this example.