D1131: DXGI Format Not GDI Compatible

A GDI compatible option was passed to this API but the DXGI format is not GDI compatible.

 

Possible Causes

Use of the D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE flag during bitmap creation enables the bitmap’s compatibility with GDI rendering, but introduces additional restrictions on the surface format of the bitmap. In general, GDI rendering is compatible with DXGI_FORMAT_B8G8R8A8_UNORM and DXGI_FORMAT_B8G8R8A8_UNORM_SRGB formats.

Possible Fixes

To address this problem, verify that the format specified for a GDI-compatible bitmap is a four-channel BGRA format as specified above. If the bitmap does not require interoperability with GDI, omit the GDI_COMPATIBLE specifier.