WPF image/bitmap rendering optimization (WPF Images/Bitmaps are blurry or pixelated)

Situation
You’re building a WPF application.

Problem
Some image/bitmap is rendered blurry or pixelated.

Solution
Modify the rendering  options corresponding to your needs.

Options to set on any UIElement (these are inherited by all sub-objects):

  • RenderOptions.BitmapScalingMode
  • UseLayoutRounding

Options to set on any image:

  • SnapsToDevicePixels
A settings that has worked very well for me is UseLayoutRounding=”true”.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.