bitmap - Sending a stream of screen captures in C++ -


i'm looking way convert screen capture char* in efficient way. thought capturing screen using bitmap object, converting bitmap object array of bytes , char*, couldn't find way convert bitmap array of bytes. thought iterating every pixel in screen capture , saving rgb values in array, creates array big me.

the end goal return char* object in fastest way doesn't return object large, , char* contains data of screen captured.

you don't given enough info/code understand you're trying achieve this. e.g. how planning represent colour coefficients? anyway, way go use opencv library, e.g.:

  cv::mat mat = cv::imread("path/to/your/file.bmp");    char table[mat.rows * mat.cols * 3]; // assuming have 3 colour channels   unsigned int index = 0;    cv::matiterator_<uchar> it, end;    for( = mat.begin<uchar>(), end = mat.end<uchar>(); != end; ++it)      table[index++] = *it; 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -