DarthAffe / ScreenCapture.NET

Fast and easy to use screen-capturing
GNU Lesser General Public License v2.1
68 stars 12 forks source link

HDR Support #23

Open wrekklol opened 11 months ago

wrekklol commented 11 months ago

I would like to request HDR support, as taking a screenshot on a HDR monitor makes the colors look like the contrast really high.

DarthAffe commented 11 months ago

There are multiple points in this:

  1. It's true that HDR-capturing is not 100% supported as the capture is always using 8bit per channel which causes a loss of detail to some extend, This can be changed actually quite easily, but requires some specific DPI-settings to work, which caused it to be a bit unhandy for common use.

  2. Doing the changes of 1. would not fix your issue that the image looks oversaturated when saved as bitmap or something similar (I guess that's what you did?). That's simply because HDR uses a different color-space and therefore either requires a HDR compatible image format or some tone mapping/conversion of the data before saving.

wrekklol commented 11 months ago

I am converting it to a OpenCV Mat. Is there any chance you could point me in the right direction of converting the data, or maybe providing an extension or helper method in the library?

DarthAffe commented 11 months ago

I've never worked with HDR before so I don't have any experience with it. I've looked through some theory about tone mapping (for example this https://64.github.io/tonemapping/) and it does not seem to bad to implement, but I also can't provide a quick method for that without diving deeper into this.