int compar(const void* pt1,const void* pt2) { short val1=*((unsigned char*)pt1); short val2=*((unsigned char*)pt2); return val1 -val2; }
qsort(tab,nb_color,3*sizeof(unsigned char),compar);