Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Gametest Screenshot Api Postprocessing #4412

Open
solonovamax opened this issue Feb 1, 2025 · 2 comments
Open

Client Gametest Screenshot Api Postprocessing #4412

solonovamax opened this issue Feb 1, 2025 · 2 comments

Comments

@solonovamax
Copy link

The client gametest api allows taking screenshots at arbitrary resolutions.
I think it would be nice if there was a way to postprocess an image in a callback before it is saved, without having to read the image from disk and then write it back to disk.

An example usecase would be to crop the image to a specific region before it is saved. Currently, the only way to crop the image to a specific region is to take the screenshot, read the screenshot from disk, crop it, then write it back to the disk.

@solonovamax solonovamax changed the title Client Gametest Screenshot Api Client Gametest Screenshot Api Cropping Feb 1, 2025
@solonovamax solonovamax changed the title Client Gametest Screenshot Api Cropping Client Gametest Screenshot Api Postprocessing Feb 1, 2025
@Earthcomputer
Copy link
Contributor

Do you have a usecase for this? I had envisaged taking screenshots as mostly for debugging and actual comparisons to be done via the screenshot comparison API, which supports both of these things.

@solonovamax
Copy link
Author

Do you have a usecase for this? I had envisaged taking screenshots as mostly for debugging and actual comparisons to be done via the screenshot comparison API, which supports both of these things.

I'm looking to take screenshots for generating recipe images (last time I checked there was like 900+, so doing it by hand is not an option), and the gametest api has proved extremely useful for this as it allows me to easily automate it.

for testing stuff, you may only care about a certain region of the screen or want to test that something is in a specific region of the screen, so why save the entire screen?

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

No branches or pull requests

2 participants