开发者

how to turn a picture from clipboard into array data

I want to turn a screen sho开发者_如何学JAVAt from the clipboard into a array data (Red/Green/Blue) in my program. so i guess it's as simple as that. but i don't want to use anything else then the print screen and clipboard if i can?

anyway any questions just ask.


You can call GetClipboardData specifying (for example) CF_DIB format, which will return a BITMAPINFO structure followed immediately by an array of data for the pixels. The BITAMPINFO structure will contain information (e.g., bits per pixel, size of image) to tell you how to interpret the pixel data.

Edit: Unless you're really intent on using the Print Screen key, it's probably easier to blit the data directly from the screen when you want it. This avoids blowing away whatever the user already had in the clipboard, and it's generally easier to do as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜