Fix rgb check.
It was doing the same check on green twice, and not checking blue.
This commit is contained in:
parent
59f63984ee
commit
768f380d81
|
@ -635,7 +635,7 @@ inline short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b)
|
|||
diff_b = abs(r-b);
|
||||
diff_c = abs(r-b);
|
||||
if( diff_a < 2 && diff_b < 2 && diff_c < 2 ) {
|
||||
if( (r!=0XFF) && (g!=0XFF) && (g!=0XFF) ) {
|
||||
if( (r!=0XFF) && (g!=0XFF) && (b!=0XFF) ) {
|
||||
if( ((r&0xF0)>>4) != 0 )
|
||||
//printf("conv gray: %x -> %d\n", ((r&0xF0)>>4) , (OFFSET_CUST_PAL) + ((r&0xF0)>>4) );
|
||||
return( (OFFSET_CUST_PAL - OFFSET_WEB_PAL) + ((r&0xF0)>>4) );
|
||||
|
|
Loading…
Reference in New Issue