GetBrightness Equivalent

  • Thread starter Thread starter Diilb
  • Start date Start date
D

Diilb

I am looking for an equivalent function or methodology to replace the
functionality of the System.Drawing.Color.GetBrightness() function is
it is not available in the Compact Framework.

Any thought would be appreciated.

Thanks!
 
Hi Diilb,

Diilb said:
I am looking for an equivalent function or methodology to replace the
functionality of the System.Drawing.Color.GetBrightness() function is
it is not available in the Compact Framework.

Any thought would be appreciated.

the .Net Compact Framework don't support the HSB-modell for colors. You have
to write your own function to change the brightness of an image.

You need the knowlegde of System.Drawing.Imaging.BitmapData and the
HSB-modell.

[BitmapData Class]
http://msdn.microsoft.com/en-us/library/system.drawing.imaging.bitmapdata.aspx

[HSL and HSV]
http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_HSV_to_RGB

With both sources you can compute each byte/pixel of an image.

Regards,

Carsten Unterberg | Test-Framework
http://test-framework.blogspot.com/
 
Back
Top