a1ex has overhauled the screenshot function.
The pull request can be found here
- Does not rely on Canon's dispcheck (which suffers from memory errors, corrupted output, inconsistent paths, camera-specific quirks... all these are fixed)
- Captures both BMP and YUV in a single screenshot (partial transparency support)
- Handles ML palette tweaks
- You can specify custom file names or patterns (e.g. "ML/TEST/myscr%02d.ppm")
- Larger file sizes (1MB). Important?
- PPM file format may not be very common in the Windows world. Important? I believe common image viewers (IrfanView?) can open them easily.
- [SOLVED] you no longer get the full YUV buffer (you only get this data in transparent areas). Important?
API change: take_screenshot (now it also accepts a custom file name, which is optional). Any other modules calling this? From ML modules, only raw_rec and mlv_rec use this one, and only for debugging, so do we need to bump the API version because of this change? (I'd say no)
API addition: in the process I've added another API, get_numbered_file_name, to help with numbered sequences of files (here, VRAMnnnn.PPM) and refactored silent pictures with this one. Is this API sufficient to cover our use cases for these file sequences?
I make heavy use of screenshots in raw_diag (will update it after merging this one).TODO:
- [DONE] add PPM file support to pic_view (should be easy).
- HDMI support (right now it will only save the central 720x480 crop). Important?
- Better transparency support. Important? any examples where this code fails?
- [DONE] full-res YUV screenshots (now it captures only 360x480). Important?
- BT.601 support in rgb2yuv422 (without it, colors might be a little off on old cameras). Important?
Here is an idea of what the new screenshot function can capture.
Does anyone know who to make ML screenshots with transparent backgrounds?
For instance, you could have a screenshot of zebras overlayed on the resulting image.
edit: I assume this is a post processing job.