for (int i = 0; i != _MashBytes.Length; i++)
{
_MashBytes[i] = ConvertByte.OperateData.ReverseByte(_MashBytes[i]);
}
BitArray _MashArray = new BitArray(_MashBytes);
bool _Lith = true;
for (int i = p_NewBitmapData.Height - 1; i != -1; i--)
{
p_MashIndex = (p_Height-1 - i) * (_MashStride * 8);
_WriteIndex = i * p_NewBitmapData.Stride;
for (int z = 0; z != p_NewBitmapData.Width; z++)
{
byte _Index = p_FileBytes[p_ReadIndex];
if (_Lith)
{
_Index = (byte)((_Index & 0xF0) >> 4);
_Lith = false;
}
else
{
_Index = (byte)(_Index & 0x0F); //后面的F
_Lith = true;
p_ReadIndex++;
}
Color _SetColor = (Color)_ColorHashTable[_Index.ToString()];
p_NewData[_WriteIndex + (z * 4)] = (byte)_SetColor.B;
p_NewData[_WriteIndex + (z * 4) + 1] = (byte)_SetColor.G;
p_NewData[_WriteIndex + (z * 4) + 2] = (byte)_SetColor.R;
p_NewData[_WriteIndex + (z * 4) + 3] = 0xFF;
if (_MashArray[p_MashIndex])p_NewData[_WriteIndex + (z * 4) + 3] = 0x00; //
p_MashIndex++;
}
}
}
private void Load1(byte[] p_FileBytes, byte[] p_NewData, int p_ReadIndex, int p_Width, int p_Height, int p_MashIndex, BitmapData p_NewBitmapData)
{
int _WriteIndex = 0;
Hashtable _ColorHashTable = new Hashtable();
for (int i = 0; i != 2; i++)
{
_ColorHashTable.Add(i.ToString(), Color.FromArgb(p_FileBytes[p_ReadIndex + 3], p_FileBytes[p_ReadIndex + 2], p_FileBytes[p_ReadIndex + 1], p_FileBytes[p_ReadIndex]));
p_ReadIndex += 4;
}
p_MashIndex = (p_Width * p_Height /8) + p_ReadIndex;
int _MashStride = p_Width / 8;
if (p_Width % 8 != 0) _MashStride++;
if (_MashStride % 4 != 0) _MashStride += _MashStride % 4;
byte[] _MashBytes = new byte[_MashStride * p_Height];
Array.Copy(p_FileBytes, p_MashIndex, _MashBytes, 0, _MashBytes.Length);
for (int i = 0; i != _MashBytes.Length; i++)
{
_MashBytes[i] = ConvertByte.OperateData.ReverseByte(_MashBytes[i]);
}
BitArray _MashArray = new BitArray(_MashBytes);
int _Lith = 7;
for (int i = p_NewBitmapData.Height - 1; i != -1; i--)
{
p_MashIndex = (p_Height - 1 - i) * (_MashStride * 8);
_WriteIndex = i * p_NewBitmapData.Stride;
for (int z = 0; z != p_NewBitmapData.Width; z++)
{
byte _Index = p_FileBytes[p_ReadIndex];
BitArray _ColorIndex = new BitArray(new byte[] { _Index });
if (_ColorIndex[_Lith])
{
_Index = 1;
}
else
{
_Index = 0;
}
if (_Lith == 0)
{
p_ReadIndex++;
_Lith = 7;
}
else
{
_Lith--;
}
Color _SetColor = (Color)_ColorHashTable[_Index.ToString()];
p_NewData[_WriteIndex + (z * 4)] = (byte)_SetColor.B;
p_NewData[_WriteIndex + (z * 4) + 1] = (byte)_SetColor.G;
p_NewData[_WriteIndex + (z * 4) + 2] = (byte)_SetColor.R;
p_NewData[_WriteIndex + (z * 4) + 3] = 0xFF;
if (_MashArray[p_MashIndex])p_NewData[_WriteIndex + (z * 4) + 3] = 0x00; //
p_MashIndex++;
}
}
}
#endregion
private void LoadImgae(short m_Piex, byte[] p_FileBytes,int _StarIndex)








