GetDIBits and loop through pixels using X, Y

后端 未结 5 1036
無奈伤痛
無奈伤痛 2020-11-28 15:43

I\'m grabbing a portion of the screen and scanning through the pixels for a certain color range.

I looked at MSDN\'s Capturing an Image example and know how to use t

5条回答
  •  Happy的楠姐
    2020-11-28 16:37

    Some surprise from MSDN:

    The table consists of an array of RGBQUAD data structures. (The table for the BITMAPCOREINFO format is built with the RGBTRIPLE data structure.) Red, green, and blue bytes are in reverse order (red swaps position with blue) from the Windows convention.

    so, colors are in BGR order in memory after GetDIBits()

提交回复
热议问题