Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2003

    Change brightness or saturation of an image


    is there a free library available to manipulate a bitmap (brighntess, saturation)?

    Or what is an easy way to do this?


  2. #2
    Regular Contributor
    Join Date
    Apr 2005
    Fortunately you didn't ask for the Hue-value. That isn't such as easy as Brightness & Saturation.
    For Brightness (v) you only have to get the maximum of rgb. So u compare theses three values and the maximum is v.
    For saturation u also need the minimum of rgb.
    The this algorithm:
    if(v != 0) s = ((max-min)/max)*255;
    else s = 0;

    As u can see both (max & min) have to be float-variables.
    But when u tell, for what you need these values, maybe I can help you better.

    Best regards

    Maybe somebody can help me with my problems?
    Watch out for cameraproblems.

    p.s.: To get the rgb:
    Make a handle on your picture, get the pixel and the use
    TInt r = pixel->Red();
    TInt g = pixel->Green();
    TInt b = pixel->Blue();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts