Tested versions
System information
Godot v4.5.stable - macOS Sequoia (15.7.1) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Apple M1 Pro - Apple M1 Pro (10 threads) - 16.00 GiB memory
Issue description
When using Godot's get_viewport().get_texture().get_image().save_png() function to save screenshot images of a game with partially transparent visuals (such as gradients which fade to transparent), using a transparent background window, the partially transparent pixels are blended with black, resulting in a darker (and uglier)
Steps to reproduce
- Display a Sprite2D that has partial transparency (such as a gradient which fades to transparent)
- Make sure background transparency settings are on (as in MRP)
- Take a screenshot using
get_viewport().get_texture().get_image().save_png()
Minimal reproduction project (MRP)
MRP uploaded here: https://github.com/mellowminx/godot-4-5-transparent-bg-screenshot-test/