Jump to content
  • Advertisement
Sign in to follow this  
Naruto-kun

Direct2D and Images

This topic is 1945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys

 

I am working on a somewhat old platform (FSX) and i figured out how to replace the GDI+ 2D drawing system (for gauges and other maps) with Direct2D to improve performance. However I am having a problem (I suspect gamma correction) when i use D2D in that the final image is much darker than GDI+.

 

D2D:

 

d2d_zps98e398cd.png

 

GDI+:

 

gdi_zpsc2e11cf0.png

 

Can someone tell me what can cause this? In addition how would i apply gamma correction to a

ID2D1DCRenderTarget?

 

Thanks

JB

Share this post


Link to post
Share on other sites
Advertisement

Just to reiterate, in Direct2D all i can find is how to set the anti-aliasing mode.

 

However this is what i have for the GDI+ version

 

mGraphics->SetCompositingMode(CompositingModeSourceOver);
mGraphics->SetInterpolationMode(InterpolationModeHighQualityBicubic);
mGraphics->SetSmoothingMode(SmoothingModeAntiAlias);
mGraphics->SetCompositingQuality(CompositingQualityGammaCorrected);

Compositing mode doesnt apply in this case, Interpolation mode is set when i call the ID2D1DCRenderTarget::DrawImage method for that specific image, and I know how to set anti aliasing. Any tips on how to get the Compositing Quality equivilent in D2D?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!