n_OriWidth = m_lpBMIH->biWidth;
n_DesWidth = m_RB.x - m_LU.x + 1;
// 原图像每行字节数
n_OriRowByte = RowByte(biBitCount, n_OriWidth);
// 目标图像每行字节数
n_DesRowByte = RowByte(biBitCount, n_DesWidth);
switch(biBitCount){
// 1位索引图
case 1:
n_StartByte = m_LU.x/8;
n_StartBit = m_LU.x%8;
n_EndByte = m_RB.x/8;
n_EndBit = m_RB.x%8;
break;
// 4位索引图
case 4:
n_StartByte = m_LU.x/2;
n_StartBit = (m_LU.x%2)*4;
n_EndByte = m_RB.x/2;
n_EndBit = (m_RB.x%2)*4+3;
break;
// 8位索引图
case 8:
n_StartByte = m_LU.x;
n_StartBit = 0;
n_EndByte = m_RB.x;
n_EndBit = 7;
break;
// 真彩图
case 24:
|