Home | History | Annotate | Download | only in lodepng

Lines Matching defs:grey

2493     case 0: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; /*grey*/
2496 case 4: if(!( bd == 8 || bd == 16)) return 37; break; /*grey + alpha*/
2507 case 0: return 1; /*grey*/
2510 case 4: return 2; /*grey + alpha*/
2988 unsigned char grey = r; /*((unsigned short)r + g + b) / 3*/;
2989 if(mode->bitdepth == 8) out[i] = grey;
2990 else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = grey;
2993 /*take the most significant bits of grey*/
2994 grey = (grey >> (8 - mode->bitdepth)) & ((1 << mode->bitdepth) - 1);
2995 addColorBits(out, i, mode->bitdepth, grey);
3022 unsigned char grey = r; /*((unsigned short)r + g + b) / 3*/;
3025 out[i * 2 + 0] = grey;
3030 out[i * 4 + 0] = out[i * 4 + 1] = grey;
3063 unsigned short grey = r; /*((unsigned)r + g + b) / 3*/;
3064 out[i * 2 + 0] = (grey >> 8) & 255;
3065 out[i * 2 + 1] = grey & 255;
3078 unsigned short grey = r; /*((unsigned)r + g + b) / 3*/;
3079 out[i * 4 + 0] = (grey >> 8) & 255;
3080 out[i * 4 + 1] = grey & 255;
3812 int grey_ok = !profile.colored && !profile.alpha; /*grey without alpha, with potentially low bits*/
3817 unsigned grey = profile.key_r;
3820 if(profile.key) setColorKeyFrom16bit(mode_out, grey, grey, grey, mode_out->bitdepth);