do you got the solution ? @StarFox
same as in my case, my laptop screen res is 1336x768
and i'd like to take a screenshot of 720x1280 (portrait) (for mobile games)
using normal method the result is; it's cropped into 720x756
it didn't take the whole 720x1280 like i wish
the normal method i'm referring to is this :
var img = get_viewport().get_texture().get_data()
img.flip_y()
img.save_png("user://screenshot.png")