locked
Direct2D and Drawing Images

    Question

  • Hi

    I am working with a existing game in which i recently switched from using GDI+ to render to a texture to Direct2D. However i have encountered a somewhat odd problem. The final image comes out a lot darker for a alpha multiplier of 1.0f when i use D2D compared to GDI+.

    (Would post pictures but the forum refuses to let me until my account is verified...how would i do this?)

    There are 2 things that i suspect. 1: In GDI+ i have a method I can call called SetCompositingQuality where i can apply gamma correction, however i cannot find a equivilent workaround for D2D. 2: The second possibility is that the image is being changed during format conversion for D2D use here:

    pConverter->Initialize(
    	pSource,
    	GUID_WICPixelFormat32bppPBGRA,
    	WICBitmapDitherTypeNone,
    	NULL,
    	100.f,
    	WICBitmapPaletteTypeMedianCut
    	);
    where pConverter is the IWICFormatConverter object. Any suggestions?

    Thanks

    JB

    Monday, May 27, 2013 5:54 PM

All replies

  • Ok i think i figured out the problem...but not a means to solve it. Is there any way to override the effects of a pre-multiplied alpha while still retaining alpha channel information when using a GDI compatible RenderTarget?

    Monday, May 27, 2013 8:27 PM