I am trying to move an application from GDI+ to Direct2D for performance reasons.
Perviously I was using StretchBlt() in HALFTONE mode which gives great, but slow results.
Now I am drawing in Direct2D with RenderTarget->DrawBitmap() but it only has two modes, LINEAR and NEAREST_NEIGHBOR, neither which are very good. LINEAR is better but still produces awful artifacts.
Does Direct2D have any high quality scaling options? If not, am I better off sticking with GDI or is there another option? This is a Windows application running in a window with various Win32 controls.
Direct2D 1.0 only supported linear and nearest-neighbor interpolation. Direct2D 1.1 adds four additional interpolation algorithms. These are available through the new device context render target (ID2D1DeviceContext
) and its DrawBitmap
and DrawImage
methods. Have a look at the D2D1_INTERPOLATION_MODE
enum:
http://msdn.com/library/hh447004.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With