[GH-ISSUE #2] FEATURE REQUEST: Support for capturing only a specific, defined area of the screen instead of the whole screen. #1

Open
opened 2026-10-15 13:27:06 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @PalaVR-AI on GitHub (Oct 15, 2024).
Original GitHub issue: https://github.com/SillyTavern/Extension-ScreenShare/issues/2

Feature Request - the ability to define a fixed portion of the window to capture instead of the entire screen.
Use case: Using SIllyTavern in a browser to the laft of a 2560x1440 game played centered on an ultrawide monitor
Currently: Screenshare sends the full 5120x1440 image, and the LLM comments on the whole thing.
Desired: Being able to define a screencapture window that is (in this use case) something like
context.drawImage(bitmap, 1280, 40, 2152, 1348)
which would capture (if I have the order of the values correctly) a "viewport" that is 2152 wide by 1348 tall (the game viewport minus the title bar at the top and the taskbar at the bottom) that is 1280 pixels from the left, and 40 pixels down (e.g. a centered, windowed game without capturing anything that's not actually the game...)

Where?
Line 34 where the canvas is defined as the whole screen...
and
Line 134 where it looks like an offset is hardcoded as "upper left"
canvas.width = bitmap.width;
canvas.height = bitmap.height;
const context = canvas.getContext('2d');
context.drawImage(bitmap, 0, 0, canvas.width, canvas.height);

Originally created by @PalaVR-AI on GitHub (Oct 15, 2024). Original GitHub issue: https://github.com/SillyTavern/Extension-ScreenShare/issues/2 Feature Request - the ability to define a fixed portion of the window to capture instead of the entire screen. Use case: Using SIllyTavern in a browser to the laft of a 2560x1440 game played centered on an ultrawide monitor Currently: Screenshare sends the full 5120x1440 image, and the LLM comments on the whole thing. Desired: Being able to define a screencapture window that is (in this use case) something like context.drawImage(bitmap, 1280, 40, 2152, 1348) which would capture (if I have the order of the values correctly) a "viewport" that is 2152 wide by 1348 tall (the game viewport minus the title bar at the top and the taskbar at the bottom) that is 1280 pixels from the left, and 40 pixels down (e.g. a centered, windowed game without capturing anything that's not actually the game...) Where? Line 34 where the canvas is defined as the whole screen... and Line 134 where it looks like an offset is hardcoded as "upper left" canvas.width = bitmap.width; canvas.height = bitmap.height; const context = canvas.getContext('2d'); **context.drawImage(bitmap, 0, 0, canvas.width, canvas.height);**
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/Extension-ScreenShare#1
No description provided.