خرید بک لینک

Vote count: 0

I am trying to take a screenshot of the whole screen and would like to send it over the network to a server. (the server will be the one to save it)

I am currently using this code

HBITMAP hBitmap = CreateCompatibleBitmap(hScreen, w, h);

CImage image;
image.Attach(hBitmap);
image.Save(L"screen.jpg");

It does save the file, but that's not what I want. I'm also not sure how to get the bytes, I was thinking of GetBits() but the documentation says it is a pointer to the data of the underlying Bitmap.

What I want to get is the JPG data which I can send through the network and save the image using the server.

So, why am I not just using bitmap and sending it directly? because it is a bit complicated and the code was quite long, you'll have to get the header and stuff. I could be wrong though.

asked 54 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 23 فروردين 1395 ساعت: 16:12

صفحه بندی