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);
本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/xueyong1203/archive/2007/01/05/1474489.aspx