I'm drawing bitmaps in Direct2D. The bitmaps utilize transparency (alpha channel).
The blending looks wrong.
As a test I loaded a pure black png image with 50% transparency and drew it over a white background. The result is pixels with a Red, Green, and Blue value of 127 (0x7F7F7F). This suggests Direct2D's blend is ignoring gamma and treating the color values as if they were linear.
(Bitmaps use the regular sRGB color space and are at 32 bits per pixel, 8-bits each for Red, Green, Blue and Alpha). They are loaded in GUID_WICPixelFormat32bppPBGRA format.
In sRGB, a blend halfway between black and white is 186 (0xBABABA). This is the ideal result I want.
Can Direct2D display transparency with respect for gamma? How would I do that? Any help appreciated.