Krombik / keysender

Node.js Desktop Automation for Windows.
MIT License
75 stars 6 forks source link

Could you add support of capturing screenshot in png or bmp format? #32

Closed huangwb68 closed 5 months ago

huangwb68 commented 6 months ago

I want to perform OCR on the screenshot to get the words so that I can determine whether to click on it. The function workwindow.capture() returns an RGBA raw buffer, but the OCR engines such as Tesseract.js only support formats of png, jpg, bmp, and pbm.

adrianocastro189 commented 6 months ago

@huangwb68 did you find any solutions to that?

I believe I'm in a earlier step where I have no idea how to handle the RGBA raw buffer. Are you able to save that buffer in any way to a file?

huangwb68 commented 6 months ago

@huangwb68 did you find any solutions to that?

I believe I'm in a earlier step where I have no idea how to handle the RGBA raw buffer. Are you able to save that buffer in any way to a file?

I switched to use robotjs instead.

Krombik commented 5 months ago

capture can return rgba data, check documentation