Thank twing. Why would you define the array data type as unsigned char? But you still present me a heuristic idea. The following method indeed works well. int size= bm.bmHeight*bm.bmWidthBytes; BYTE *px = new BYTE[size]; pBitmap->GetBitmapBits(size,px); Then, the array px stores the pixel value RGB, you can also use loop in +4 to get single R,G or B value, and use forced transform method, int ( px[i]) to get an int type value. Thanks, Ninaming :rose: