Quantcast
Viewing all articles
Browse latest Browse all 40524

GetDIBits to OfPixels

Hi everyone,

I got the pixels from GetDIBits function like below.

Mat src;
GetDIBits(hwindowCompatibleDC,hbwindow,0,height,src.data,(BITMAPINFO *)&bi,DIB_RGB_COLORS);

I can use unsigned char pointer or array instead of "src.data" above. I have to transmit this pixel data to ofpixels.

I've tried this

OfPixels screenPixels;
screenPixels.setFromExternalPixels(src.data,width,height,3);

I got the error that "Access violation reading location"

How can i fill ofPixels with raw pixel data ?

Thanks


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>