RGB与int互相转换

int R =(rgb & 0xff0000 ) >> 16 ;
int G= (rgb & 0xff00 ) >> 8 ;
int B= (rgb & 0xff );
转换成三个颜色分量
可现在我想把他逆回去 怎么弄 有人知道码?

rgb= ((r*256)+g)*256+b

Leave a Reply

Your email address will not be published. Required fields are marked *