wpfimagecolor-depthwritablebitmapcolor-management

Doesn't WPF support 10-bit monitors (aka 30 bit colors)?


I need to support 10 bit per pixel displays (aka 30 bit colors) in a WPF image viewing app.

I have a working setup (10bit screen and Nvidia Quadro) where I have been able to verify that the 10 bit support works by testing with gradient in PhotoShop: (http://www.tedlansingphotography.com/blog/?p=287) and a NEC demo program (both using OpenGL as far as I can see).

However I can't get my WPF app to display a nice gradient without banding. I tried procedurally generating a WritableBitmap with PixelFormats.Rgb48 and PixelFormats.Bgr101010 but when I draw it on screen (by assigning it to a System.Windows.Controls.Image.Souce) I still see banding.

  1. Doesn't WPF support 10-bit monitors?
  2. Are there any alternative WPF friendly APIs that support it (or do I have to rewrite the program in OpenGL)?

Solution

  • Wpf does not support 10 bits per channel (bpc) display; only 8 bpc despite the 10bpc file manipulation and the fact that WPF has intern interop with DirectX.

    To have 10 bpc inside WPF, you might want to inject OpenGL or DirectX display; the advantage of using DirectX over OpenGL is that the 10bpc display will be supported with Geforce display cards too; OpenGL 10 bpc display is supported only by Quadro, if I may mention the GPU manufacturer I know.

    Photoshop is using OpenGL for display, hence 10bpc display with Photoshop is functionnal only with Quadro (this is due to more complete OpenGL functionnalities supported by the Quadro drivers).

    https://github.com/Microsoft/WPFDXInterop

    https://www.codeproject.com/Articles/23736/Creating-OpenGL-Windows-in-WPF

    https://www.codeproject.com/Articles/265903/Using-OpenGL-in-a-WPF-Application