RenderTargetBitmap and DPI

10,959

The default of 96 is just the most general/used dpi of desktop displays. But that will/might change.

If you know what dpi the bitmap must have during compilation of your program you could set it at the desired value (e.g. 96) The be honest, I'd use a constant to do that but it boils down to the same thing at runtime.

If you do not know at what resolution the image will be needed you shouldn't hard-code the dpi.

By the way: make sure you always set the dpi of an image correctly.

Share:
10,959

Related videos on Youtube

Patrick Klug
Author by

Patrick Klug

Runs Greenheart Games, creators of Game Dev Tycoon (HTML5) and the upcoming Tavern Keeper (Unity/C#). Previously worked extensively on a mind mapping app called NovaMind (WPF/C#).

Updated on October 15, 2020

Comments