{"id":4363,"date":"2013-05-15T07:00:00","date_gmt":"2013-05-15T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2013\/05\/15\/what-does-gdi-use-bixpelspermeter-and-setbitmapdimensionex-for\/"},"modified":"2013-05-15T07:00:00","modified_gmt":"2013-05-15T07:00:00","slug":"what-does-gdi-use-bixpelspermeter-and-setbitmapdimensionex-for","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20130515-00\/?p=4363","title":{"rendered":"What does GDI use biXPelsPerMeter and SetBitmapDimensionEx for?"},"content":{"rendered":"<p>What does GDI use <code>BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter<\/code> and <code>Set&shy;Bitmap&shy;Dimension&shy;Ex<\/code> for?<\/p>\n<p> Nothing. <\/p>\n<p> The <code>BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter<\/code> and <code>BITMAP&shy;INFO&shy;HEADER.biYPels&shy;Per&shy;Meter<\/code> are completely ignored by GDI when loading a bitmap. The values are there for the benefit of image-editing programs who want to record additional information about the bitmap, but GDI ignores them. <\/p>\n<p> Similarly, the <code>Set&shy;Bitmap&shy;Dimension&shy;Ex<\/code> and <code>Get&shy;Bitmap&shy;Dimension&shy;Ex<\/code> functions update a <code>SIZE<\/code> structure associated with each bitmap, but GDI does nothing with the values, aside from initializing them to zero when the bitmap is created. <\/p>\n<p> The value is there so that, for example, a program which puts a bitmap on the clipboard can specify the recommended physical dimensions of the bitmap, in order to help another program that reads the bitmap from the clipboard (for example, a word processor) decide how big to resize the bitmap when it is pasted. <\/p>\n<p> Whether any programs actually do this sort of thing I do not know. <\/p>\n<p> But that&#8217;s what it&#8217;s there for, in case anybody wanted to do it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>What does GDI use BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter and Set&shy;Bitmap&shy;Dimension&shy;Ex for? Nothing. The BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter and BITMAP&shy;INFO&shy;HEADER.biYPels&shy;Per&shy;Meter are completely ignored by GDI when loading a bitmap. The values are there for the benefit of image-editing programs who want to record additional information about the bitmap, but GDI ignores them. Similarly, the Set&shy;Bitmap&shy;Dimension&shy;Ex and Get&shy;Bitmap&shy;Dimension&shy;Ex functions update a SIZE structure [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-4363","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>What does GDI use BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter and Set&shy;Bitmap&shy;Dimension&shy;Ex for? Nothing. The BITMAP&shy;INFO&shy;HEADER.biXPels&shy;Per&shy;Meter and BITMAP&shy;INFO&shy;HEADER.biYPels&shy;Per&shy;Meter are completely ignored by GDI when loading a bitmap. The values are there for the benefit of image-editing programs who want to record additional information about the bitmap, but GDI ignores them. Similarly, the Set&shy;Bitmap&shy;Dimension&shy;Ex and Get&shy;Bitmap&shy;Dimension&shy;Ex functions update a SIZE structure [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/4363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=4363"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/4363\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=4363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=4363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=4363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}