Representation of colors in CHDK - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Representation of colors in CHDK

  • 1 Replies
Representation of colors in CHDK
« on: 11 / June / 2010, 09:26:31 »

Looking over the gui_draw.c file in the CHDK source code, I see that colors are represented as 8-bit values.  I would like to know more about how these values are mapped onto the color-space -- the reason is that I am working on a game that involves drawing colors that are specified from a text file in RGB representation (i.e. 0xRRGGBB).  For my particular application it would be very inconvenient to specify colors directly in the CHDK representation, so I would like to program a function that takes a color in RGB representation and converts it to the CHDK representation.  Does anyone know how to do this?



Offline reyalp

  • ******
  • 14098
Re: Representation of colors in CHDK
« Reply #1 on: 12 / June / 2010, 02:32:50 »
The bitmap display  (where the gui is drawn) is paletted, 8 bit. The palette varies between cameras, and also between playback and shooting mode.

Changing the palette shouldn't be too hard, but CHDK does not have this functionality, and it would require code for every camera, unless there's an eventproc that does it.


Look promising. May need to be registered with UI_RegistDebugEventPro and/or RegisterDialogAPIForEventProcedure
Don't forget what the H stands for.


Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal