flycast icon indicating copy to clipboard operation
flycast copied to clipboard

BMP Screenshot Option

Open xnamkcor opened this issue 2 months ago • 5 comments

When taking higher resolution screenshots, it takes multiple seconds. Maybe bypassing the PNG encoding time might help.

Add an option to save screenshot as BMP or other uncompressed image format.

Some kind of raw dump that can be converted to a screenshot later? Maybe also an option to choose a scaling factor or absolute resolution for the screenshots.

xnamkcor avatar Oct 22 '25 01:10 xnamkcor

What kind of resolution are you using and what are your specs?

flyinghead avatar Oct 22 '25 16:10 flyinghead

What kind of resolution are you using and what are your specs?

For the screenshots I was using "8x", which ends up being 3840 vertical for Sonic Adventure. And at the widest I can get it before it started having graphical problems or crashing, it's about 15436x3840. Largest PNG is about 78MB. 177,822,774 bytes as a BMP. I've turned off as much filtering and AA as I can. Specs: AMD Ryzen 5 2600, MSI Radeon RX 580 4GB, 32GB DDR4 at 2133MHz.

PS: Yes I've tried turning on XMP or whatever. It just fails the training. I'm not gonna spend more money on RAM until I upgrade to AM5/DDR5.

xnamkcor avatar Oct 23 '25 01:10 xnamkcor

It's worth mentioning that stb_image_write supports different compression levels that correlate with image encoding performance. Might be worth exposing as a config option. The PNG encoder in particular lets you set the zlib compression-level, defaulting to 8. https://github.com/nothings/stb/blob/4c5645949723fbb9c060c3f94157331fa1d043bf/stb_image_write.h#L99-L100

The TGA encoder allows you to disable RLE compression as well, allowing for faster saves: https://github.com/nothings/stb/blob/4c5645949723fbb9c060c3f94157331fa1d043bf/stb_image_write.h#L106-L107

Wunkolo avatar Oct 23 '25 05:10 Wunkolo

You can't expect screenshots to be instantaneous with such a resolution, whether compressed or not. Also you are much more likely to run out of VRAM, or hit your GPU limits in complex scenes in per pixel mode (which you should be using).

flyinghead avatar Oct 23 '25 06:10 flyinghead

You can't expect screenshots to be instantaneous with such a resolution, whether compressed or not. Also you are much more likely to run out of VRAM, or hit your GPU limits in complex scenes in per pixel mode (which you should be using).

I agree. But can we have BMP screenshots?

xnamkcor avatar Oct 23 '25 11:10 xnamkcor