本帖最后由 memoryland 于 2011-09-02 20:54:43 编辑

解决方案 »

  1.   

    谢谢 LMAOhuaNL。
    我修改代码如下:Bitmap bmpfile = new Bitmap("xxx.png", true);
    Color bmpcolor = bmpfile.GetPixel(j, i);
    Rectangle rect = new Rectangle(0, 0, bmpfile.Width, bmpfile.Height);
    BitmapData bmpdata = bmpfile.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
    unsafe
    {
             byte* pIn = (byte*)(bmpdata.Scan0.ToPointer());         for (int i = 0; i < bmpdata.Height; i++)
             {
                 for (int j = 0; j < bmpdata.Width; j++)
                 {
                       string str_alphabmp = pIn[0].ToString("X2")); 
                       ...
                  }
              }
    }
    读出来的数据似乎是BGRA的排列,但Alpha通道值仍旧全部为0xFF。