Poker-AI.org
http://poker-ai.org/phpbb/

PrintWindow on Android emulator
http://poker-ai.org/phpbb/viewtopic.php?f=26&t=3075
Page 1 of 1

Author:  HontoNiBaka [ Sat Sep 02, 2017 8:56 pm ]
Post subject:  PrintWindow on Android emulator

I have tried to take screenshots pf several Android emulators for my OCR, but so far it only returns a black image, or a completelly white image.
I have read, that the reason is probably, that they use OpenGL. I also tried to get the pixels from an injected DLL, with BitBlt and so on, but nothing is really working.
I can just screenshot the whole Desktop, that works but it sucks as the windows can not overlap.

Has anyone had success with screenshotting an Android Emulator?

Author:  shalako [ Sat Sep 02, 2017 10:47 pm ]
Post subject:  Re: PrintWindow on Android emulator

Why not just take the screenshot from outside of the emulator or VM?

Author:  HontoNiBaka [ Sat Sep 02, 2017 10:57 pm ]
Post subject:  Re: PrintWindow on Android emulator

Yes, that's what I am trying to do. I am not trying to create a screenshot from inside the emulator.

Basically I have my c++ application on my Windows desktop and try to screenshot the emulator window. I know how to get the s creenshot of the whole desktop, but the good thing about printwindow is, that you can pass it a HWND and it will even print background windows, but it's not working with any emulator so far.

Author:  nefton [ Sun Sep 03, 2017 9:58 am ]
Post subject:  Re: PrintWindow on Android emulator

I think you should use DirectShow to capture it.
Because standard С++ capture tools like
Code:
HWND hDesktopWnd = GetDesktopWindow();
HDC hDesktopDC = GetWindowDC(hDesktopWnd);
HDC hCaptureDC = CreateCompatibleDC(hDesktopDC);;
HBITMAP hCaptureBitmap = CreateCompatibleBitmap(hDesktopDC, nScreenWidth, nScreenHeight);
......

do not work with directshow propertly (and may be with openGL too).

Author:  HontoNiBaka [ Fri Sep 08, 2017 9:22 pm ]
Post subject:  Re: PrintWindow on Android emulator

I the end I just ended up screenshotting the whole desktop.

Author:  listerofsmeg [ Tue Sep 12, 2017 9:15 pm ]
Post subject:  Re: PrintWindow on Android emulator

What is the app out of curiosity?

I use minicap for taking Android screenshots.

Author:  HontoNiBaka [ Thu Sep 21, 2017 2:57 pm ]
Post subject:  Re: PrintWindow on Android emulator

There are a few poker apps for android nowadays. My OCR is not going that well so far, does anyone know if it's possible to somehow hook text functions on the emulator? Something like ExtTextout on windows?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/