I am using WPF for an image resizing pipeline which has been working beautifully under .NET v3.5. I just upgraded the project to target v4.0 and now all of my resized images are heavily aliased. None of the image pipeline code has changed.
Has a default WPF setting changed between v3.5 and v4.0?
How do I control the dithering of my resized bitmap images in WPF?
I'm using BitmapImage
, DrawingVisual
, DrawingContext
, RenderTargetBitmap
, BitmapEncoder
, and BitmapFrame
but I'm not seeing any properties related to dithering. GDI+ had a bunch of settings, so I'm guessing that I'm missing something.
Update: it appears that all of the solutions I've seen assume a Window object or XAML environment. This runs inside a Windows Service which has no UI. I need a way to programmatically affect this setting.
I specifically switched from GDI+ to WPF because GDI+ has memory leaks in long running processes like services & web apps.