Add screenshot button to export current screen content
Open, Needs TriagePublic

Reference:

SDL_Surface * surf = SDL_CreateRGBSurfaceFrom(pixels, w, h, 8*4, w*4, 0,0,0,0);
SDL_SaveBMP(surf, filename);
SDL_FreeSurface(surf);

Would that really save much time/effort?

I do:
Alt + Printscreen with the visualizer open and then on paste.pics Ctrl+V
Even having to type in a filename to save would take me longer...

BAndiT1983 added a comment.EditedMay 4 2020, 7:15 PM

It's really not a lot of code to do and would save only the framebuffer to file. Just a nice to have feature, like we did it for OC.

PS: Also i see it as a task for newcomers, so they can learn the visualiser structure.

Understood and convinced :)

MarkusEngsner added a subscriber: MarkusEngsner.

I created a pull request for this: https://github.com/apertus-open-source-cinema/AXIOM-Remote/pull/32

Changes made:

  • Moved the 'Simulate LCD' and 'Debug overlay' buttons slightly upwards, to make room for the screenshot button.
  • Added the screenshot button and a corresponding handler, that saves a png with a timestamp as a name.
  • Added the screenshots/ subdirectory, in order for the screenshots not to bloat the main folders.
    • This required adding an empty .gitkeep file, to be able to commit the empty directory. This is needed, because IMG_SavePNG() refuses to create the directory.

Demo

And the saved screenshot: