ARGB8888 --> ARGB4444&Other Formats 收藏

来源:互联网 发布:淘宝网外贸男装 编辑:程序博客网 时间:2024/05/22 10:53

int argb8888;
int a=(argb8888 & 0xff000000)>>24;
int r=(argb8888 & 0x00ff0000)>>16;
int g=(argb8888 & 0x0000ff00)>>8;
int b=(argb8888 & 0x000000ff)>>0;
 
short argb4444=((a>>4)<<12)|((r>>4)<<8)|((g>>4)<<4)|((b>>4)<<0);
short rgb555=((r>>3)<<10)|((g>>3)<<5)|((b>>3)<<0);
short rgb565=((r>>3)<<11)|((g>>2)<<5)|(b>>3);


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/xueyong1203/archive/2007/01/05/1474489.aspx

原创粉丝点击