-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raw screenshots have duplicated pixels and no Pixel Aspect Ratio metadata #4754
Comments
At this moment, the raw capture mode is more of a direct capture of the pixel values as rasterized by the monitor, so if you're using a 200-line graphics mode on VGA, and the VGA is doubling each scan line as VGA normally does in those modes, then the raw capture will contain the raw pixel values, scan line doubled. Good point on the aspect ratio fields though, I think I can figure out how to use libpng to write that. |
I'm sorry if "raw" is confusing in that it's not exactly a snapshot of video memory, but only a snapshot of the raw pixel values from video memory as they are rasterized to the screen. |
http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.9 And the libpng function is png_set_pHYs but only if PNG_pHYs_SUPPORTED.
|
Done. See latest commit. |
FYI, DOSBox Staging now has a revised raw capture mode which writes the raw framebuffer, e.g., 640x200 as 640x200. Plus we also write the aspect ratio info into the PNG header, and we introduced the "upscaled" mode which essentially does aspect ratio correct upscaling via bilinear sharp to roughly 1200px of vertical resolution as most image viewers can only do square pixels. |
Describe the bug
While taking raw screenshots for #4753, I noticed two problems with the saved png files:
Example:
Steps to reproduce the behaviour
Expected behavior
dosbox-staging already implemented this on their raw screenshots.
Example (please view the image using XnView, since it supports the Pixel Aspect Ratio metadata to render rectangular pixels):
What operating system(s) this bug have occurred on?
macOS 13.6.3
What version(s) of DOSBox-X have this bug?
2023.10.06
Used configuration
No response
Output log
No response
Additional information
No response
Have you checked that no similar bug report(s) exist?
Code of Conduct & Contributing Guidelines
The text was updated successfully, but these errors were encountered: