Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am not sure but you can refer the below link to get some idea on how to get rgb values.</p> <p><a href="https://stackoverflow.com/questions/3291923/how-to-get-rgb-value-by-cimg">RGB_Info</a></p> <p>Also check the below link were they have mentioned the example as mentioned below:-</p> <p><a href="http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/79d828ff-7479-40e9-b02e-025ca4155a97" rel="nofollow noreferrer">RGB_Info_MSDN_Link</a></p> <pre><code>//Pass the handle to the window on which you may want to draw struct vRGB { vRGB():R(0), G(0), B(0){} vRGB(BYTE r, BYTE g, BYTE b):R(r), G(b), B(b){} BYTE R, G, B; }; void GetBitmapPixel(HWND hwnd, std::vector&lt;std::vector&lt;vRGB&gt;&gt; &amp;pixel){ BITMAP bi; //Load Bitmap from resource file HBITMAP hBmp = LoadBitmap(GetModuleHandle(0),MAKEINTRESOURCE(IDB_BITMAP1)); //Get the Height and Width ::GetObject(hBmp, sizeof(bi), &amp;bi); int Width = bi.bmWidth; int Height = bi.bmHeight; //Allocate and Initialize enough memory for external (Y-dimension) array pixel.resize(Height); //Create a memory device context and place your bitmap HDC hDC = GetDC(hwnd); HDC hMemDC = ::CreateCompatibleDC(hDC); SelectObject(hMemDC, hBmp); DWORD pixelData = 0; for (int y = 0; y &lt; Height; ++y) { //Reserve memory for each internel (X-dimension) array pixel[y].reserve(Width); for (int x = 0; x &lt; Width; ++x) { //Add the RGB pixel information to array. pixelData = GetPixel(hMemDC, x, y); pixel[y].push_back(vRGB(GetRValue(pixelData), GetGValue(pixelData), GetBValue(pixelData))); } } //Cleanup device contexts DeleteDC(hMemDC); ReleaseDC(hwnd, hDC); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload