sanyaade-g2g-repos / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Lua API to get/set RGB quantization level #531

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Fairly simple: Just want get/set access to the 'RGB levels' value in the 
palette rightclick-dialog.

This is useful for
a) providing a presets-menu (Amiga, CPC, etc)
b) intelligent ramping code (don't generate colors that will be identical once 
quantized, instead vary their RGB values to produce an appropriate painterly 
brightness-ramping. (as seen in Amiga demoscene gfx))
c) other palette-analysis/mutation code (again, don't generate pointless 
identical-colors because of a delusion that 256 levels are available)

I should be able to work up a patch for this myself, within a few days.

It would also be nice to be able to get a lookup table mapping quantized values 
to output values. This would avoid any mathematical errors if the GrafX2 
quantization changes (eg different rounding policy)

Original issue reported on code.google.com by fintic...@gmail.com on 1 May 2013 at 2:06