Skip to content

Fix screen capture cropping issue#27

Closed
subbon wants to merge 1 commit intoMineDojo:mainfrom
subbon:main
Closed

Fix screen capture cropping issue#27
subbon wants to merge 1 commit intoMineDojo:mainfrom
subbon:main

Conversation

@subbon
Copy link
Copy Markdown

@subbon subbon commented Dec 29, 2025

On my setup (Windows 11, RTX 4070 Ti Super), I encountered an issue where the game capture was significantly cropped (zoomed into the top-left corner).

It appears that the bounding box coordinates passed to dxcam were calculated as (left, top, width, height), which resulted in an incorrect capture region on my machine.

I modified game_env.py to pass (left, top, right, bottom) instead, which fixed the cropping issue for me.

Additionally, I added SetProcessDpiAwareness to ensure correct coordinate handling on High DPI displays, although the coordinate fix was the primary solution in my case.

image (98) image (99)

On my setup (Windows 11, RTX 4070 Ti Super), I encountered an issue where the game capture was significantly cropped (zoomed into the top-left corner).

It appears that the bounding box coordinates passed to dxcam were calculated as (left, top, width, height), which resulted in an incorrect capture region on my machine.

I modified game_env.py to pass (left, top, right, bottom) instead, which fixed the cropping issue for me.

Additionally, I added SetProcessDpiAwareness to ensure correct coordinate handling on High DPI displays, although the coordinate fix was the primary solution in my case.
@subbon subbon closed this by deleting the head repository Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant