How do i flip on the y axis a photo made with the file dialog?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Drawsi

Every time i try to take a picture of anything I draw, the end result is flipped for no apparent reason. I tried switching some settings around but got nowhere. Any help?

:bust_in_silhouette: Reply From: Saitodepaula

Try:

var image = get_viewport().get_texture().get_data()
image.flip_y()
image.save_png("image.png")