Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 441 Bytes

File metadata and controls

23 lines (17 loc) · 441 Bytes

Window Graphic Capture Library

Base on Win32CaptureSample.

usage

int main() {
    HWND hwnd = FindWindowA(nullptr, "MapleStory");
    if (!hwnd) {
        printf("MapleStory not found\n");
        return -1;
    }
    WGCapturer grab(hwnd);
    grab.setTargetRegion(1, 31, 1366, 768);
    auto mat = grab.capture({});
    cv::imwrite("my.png", mat[0]);
    return 0;
}