mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 16:22:12 +00:00

When iceiceice (@cbeck88) added "save screenshots as PNGs" support back in 2014 (8dfdc6b185f7d9c5d6166f28dd2693fc64a30a27) we had yet to switch to SDL 2. At the time, SDL_Image didn't provide any method of saving PNG files on its own. However, it does as of SDL_Image 2.0.0. A small caveat is that this built-in PNG save functionality is a bit less efficient at compression than SDL_SavePNG. A test in DiD S1 with SDL_SavePNG_RW vs IMG_SavePNG_RW yielded a file ~ 1 MB larger in the latter case. This removed SDL_SavePNG and it's optional build-time dependency of libpng.