New feature: PNG screenshots
So it took a bit longer than might have been hoped, but Rebirth now supports writing screenshots as PNG instead of TGA (for OGL) / PCX (for SDL). This was originally proposed by a now anonymous comment in main/game.c that was already present when btb imported d2x-0.0.8. I have been unable to trace it back farther to see who first proposed it. btb's import is dated 2001 though.

As for the feature itself, it is on by default as of Add support for PNG screenshots. It requires libpng-devel to build and libpng to run. The configure test will probe for both and, if not found, suggest using screenshot=legacy to switch back to the old formats. At some point, that support may be removed in order to clean up the code.

Due to the PNG format's native support for in-file compression, PNG screenshots are substantially smaller than the old format. Additionally, PNG is well-supported by many modern tools, whereas the older formats sometimes required conversion. (I'm looking in particular at some recent posts in the General board where screenshots were converted to jpg. PNG screenshots can be posted natively, unlike the screenshots that poster used as input.)

PNG screenshots store some information in text chunks in the file, which can be viewed using ImageMagick's identify with the -verbose option. From one of mine:
Rebirth.current_level_number: 1
Rebirth.mission.pathname: descent
Rebirth.mission.textname: Descent: First Strike
Rebirth.viewer_segment: 4
Metadata fields may be added, removed, or changed in later versions, though I presently have no plans to do so.

Screenshots are now written with a date-stamped filename, rather than the historical scrnNNNN.EXT. This change applies even when switching to the older file formats.
Awesome, thanks! I imagine that players on Windows will greatly appreciate this feature, as Windows doesn't have a built-in image viewer that can open TGA or PCX files.
Interesting. I distinctly remember opening PCX screenshots (of another game) on Windows, back when I still ran Windows on real hardware. I guess Microsoft no longer ships that viewer.

Now we just need to replace all the other outputs with formats that are accessible to modern tools. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)