Algorithm of bitmap getbrightness() in C# -


I want to implement the function in Java which calculates the brightness of the color similar to the brightness () function that will get C # is. So I need to know the exact algorithm which was used in C #. There are some algorithms but 5% of them have errors.

Use the official source: Public Float GetBrightness () {Float R = (float) R / 255.0F; Float G = (Float) G / 255.0F; Float B = (Float) B / 255.0F; Float Max, Min; Max = r; Min = r; If (g> maximum) max = g; If (b> max) max = b; If (G & lt; minutes) minimum = g; If (B & l; minutes) minutes = B; Return (max + min) / 2; }

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -