Skip to main content

This module takes screenshots of BlueStacks using the win32 API, resizes and crops them to the same size of an ADB screenshot.

Project description

This module takes screenshots of BlueStacks using the win32 API, resizes and crops them to the same size of an ADB screenshot.

You can easily get more than 100 FPS, but the BlueStacks window may not be minimized! You can put it in the background, but don't minimize it!
pip install bluestacks-fast-screenshot



# Update 22/12/2022 - Less code / less dependencies 



from bluestacks_fast_screenshot import get_bluestacks_screenshot

import cv2

blueit = get_bluestacks_screenshot(

    adb_path="C:\\Users\\USERNAME\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe",

    deviceserial="localhost:5795",

    windowtitle="bluestacks",

    interpolation=cv2.INTER_AREA,

    ignore_exceptions=True,

    show_fps=True,

)



for pic in blueit:

    # do your stuff here

    cv2.imshow("", pic.copy())

    

    if cv2.waitKey(1) & 0xFF == ord("q"):

        cv2.destroyAllWindows()

        break

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluestacks_fast_screenshot-0.13.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

bluestacks_fast_screenshot-0.13-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page