Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Change Gamma Ramp

Change Gamma Ramp

Scheduled Pinned Locked Moved C / C++ / MFC
c++htmlcom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robsori
    wrote on last edited by
    #1

    Does anybody have sample code in C++ to change the gamma ramp. I want to set the colours, contrast and brightness of an LCD panel. Similar with: http://www.majorgeeks.com/Gamma\_Panel\_d2796.html Regards.

    C 1 Reply Last reply
    0
    • R Robsori

      Does anybody have sample code in C++ to change the gamma ramp. I want to set the colours, contrast and brightness of an LCD panel. Similar with: http://www.majorgeeks.com/Gamma\_Panel\_d2796.html Regards.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      gamma adjustment is a simple mapping:

      double fGammaInverse = 1.0 / gamma;
      for each pixel
      for each color component
      pixVal = (BYTE) (256 * pow ((double)pixVal / 256.0, fGammaInverse));

      Cleek | Image Toolkits | Thumbnail maker

      R 1 Reply Last reply
      0
      • C Chris Losinger

        gamma adjustment is a simple mapping:

        double fGammaInverse = 1.0 / gamma;
        for each pixel
        for each color component
        pixVal = (BYTE) (256 * pow ((double)pixVal / 256.0, fGammaInverse));

        Cleek | Image Toolkits | Thumbnail maker

        R Offline
        R Offline
        Robsori
        wrote on last edited by
        #3

        Thank you for your answer. I've saw the example on NirSoft web site http://www.nirsoft.net/vc/change\_screen\_brightness.html where I can make the screen brighter or darker but how can increase or decrease the intensity of the red/green/blue components? For example: How can to increase only the blue component in all RGB values to add more blue color to the entire display? Robert.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups