Fabric API

Fabric API

152M Downloads

Client Gametest Screenshot Api Postprocessing

solonovamax opened this issue ยท 2 comments

commented

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.

commented

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.

commented

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?