{"id":5816,"date":"2014-04-07T09:27:39","date_gmt":"2014-04-07T09:27:39","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/problem-about-rendertargetbitmap-collection-of-common-programming-errors\/"},"modified":"2014-04-07T09:27:39","modified_gmt":"2014-04-07T09:27:39","slug":"problem-about-rendertargetbitmap-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/problem-about-rendertargetbitmap-collection-of-common-programming-errors\/","title":{"rendered":"problem about rendertargetbitmap-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/42910619ef3d550e37f7150caa0d94ff?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPatrick Klug<br \/>\nc# wpf rendertargetbitmap<br \/>\nI don&#8217;t understand why the DPI parameters on the RenderTargetBitmap are used the way they seem to be used. Quite often I see code that deals with non-standard DPI settings by adjusting the image size based on the DPI like this:new RenderTargetBitmap ((int) (width\/96d)*dpi, (int) (height\/96d)*dpi, dpi, dpi, PixelFormats.Pbgra32);Examples:http:\/\/blogs.msdn.com\/b\/jaimer\/archive\/2009\/07\/03\/rendertargetbitmap-tips.aspxContentControl + RenderTargetBitmap + empty imagehttp:\/\/social.msdn.microsoft.com\/f<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Patrick Klug c# wpf rendertargetbitmap I don&#8217;t understand why the DPI parameters on the RenderTargetBitmap are used the way they seem to be used. Quite often I see code that deals with non-standard DPI settings by adjusting the image size based on the DPI like this:new RenderTargetBitmap ((int) (width\/96d)*dpi, (int) (height\/96d)*dpi, dpi, dpi, PixelFormats.Pbgra32);Examples:http:\/\/blogs.msdn.com\/b\/jaimer\/archive\/2009\/07\/03\/rendertargetbitmap-tips.aspxContentControl + [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5816","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5816"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5816\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}