Hello BoltBait,
I use Paint.Net for a few month now and I'm not satisfied by the "Autoadjust" features.
So I decided to write my own function, hoping that it will help other users.
I downloaded CodeLab, learnt basics of C# (i know C/C++) and started to work.
I succeeded to manually modify contrast and light of the image. Basic stuff, but I wanted to start with simple algo ;-)
Then I started to autodetect min light / max light for the whole picture, to be able to feed to contrast/light adjustment.
Here I have a problem : I can clearly see the different ROI of Paint.Net (stripes).
As you explain on your website, the render function has been called for each ROI, thus calculating different min/max for each ROI.
(I guess).
My question is : how to run a unique min/max calculation ?
I'm thinking of 2 solutions :
- concurrent affectation of min/max (global variables) but this seems forbidden in C# (not in C++).
- preventing only the "min/max seeking loop" to be multi-instanciated. Kind of #pragma ?
Any idea would be appreciated :)