{"id":3850,"date":"2016-03-18T21:53:29","date_gmt":"2016-03-18T12:53:29","guid":{"rendered":"http:\/\/pchero21.com\/?p=3850"},"modified":"2016-03-18T21:53:29","modified_gmt":"2016-03-18T12:53:29","slug":"why-bmp-file-save-as-up-side-down","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=3850","title":{"rendered":"Why BMP file save as up side down?"},"content":{"rendered":"<p>BMP \ud30c\uc77c\uc744 \uc5f4\uc5b4\ubcf4\uba74 \ud30c\uc77c\uc548\uc758 \ub0b4\uc6a9\uc774 \uc0c1\ud558\ubc18\uc804\ub418\uc5b4 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4. \uadf8 \uc774\uc720\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<p>\ucc98\uc74c\uc5d0 IBM(OS\/2)\uc5d0\uc11c \uc88c\ud45c \uccb4\uacc4 \ub9cc\ub4e4 \ub54c, \uc708\ub3c4\uc6b0, \uadf8\ub798\ud53d, \ube44\ud2b8\ub9f5 \ub4f1 \uc804\ubd80\ub2e4 \ud1b5\uc77c\uc131\uc744 \uac00\uc9c0\uae38 \uc6d0\ud588\ub2e4.<br \/>\n\uc774\uc5d0 \ub2e4\uac19\uc774 \ubaa8\uc5ec \ud68c\uc758\ub97c \ud588\ub294\ub370, \ud504\ub85c\uadf8\ub798\uba38\ub97c \ube44\ub86f\ud55c \ub300\ubd80\ubd84\uc758 \uc0ac\ub78c\ub4e4\uc740 \uc704\ucabd\uc5d0\uc11c \uc544\ub798\ucabd\uc73c\ub85c \ub370\uc774\ud130\ub97c \ub098\ud0c0\ub0b4\uae38 \uc6d0\ud588\ub2e4. \ud558\uc9c0\ub9cc \ud558\ub4dc\ucf54\uc5b4 \uadf8\ub798\ud53d \uac1c\ubc1c\uc790\ub4e4\uc740 \uc218\ud559\uc801 \ubc29\uc2dd\uc5d0 \uc758\ud55c Bottom up \ubc29\uc2dd\uc744 \uc6d0\ud588\ub2e4. \ub9ce\uc740 \ub17c\uc758 \ub05d\uc5d0 \uacb0\uad6d\uc740 \ud558\ub4dc\ucf54\uc5b4 \uadf8\ub798\ud53d \uac1c\ubc1c\uc790\ub4e4\uc774 \uc6d0\ud558\ub294 \ubc29\uc2dd\ub300\ub85c \ub418\uc5c8\ub2e4.<\/p>\n<blockquote>\n<h2><a name=\"476\"><\/a>Bottoms Up!<\/h2>\n<p>Like most bitmap formats, the pixel bits in the DIB are organized in horizontal rows, sometimes also called &#8220;scan lines&#8221; from the terminology of video display hardware. The number of rows is equal to the <i>bcHeight<\/i> field of the BITMAPCOREHEADER structure. However, unlike most bitmap formats, the DIB begins with the bottom row of the image and proceeds up through the image.<\/p>\n<p>Let&#8217;s establish some terminology here. When I say &#8220;top row&#8221; and &#8220;bottom row,&#8221; I mean the top and bottom of the visual image as it appears when correctly displayed on the monitor or printer page. The top row of a portrait is hair; the bottom row of a portrait is chin. When I say &#8220;first row,&#8221; I mean the row of pixels that is found directly after the color table in the DIB file. And when I say &#8220;last row,&#8221; I mean the row of pixels at the very end of the file.<\/p>\n<p>So, in DIBs, the bottom row of the image is the first row of the file, and the top row of the image is the last row in the file. This is called a bottom-up organization. Because this organization is counterintuitive, you may ask why it&#8217;s done this way.<\/p>\n<p>Well, it all goes back to the OS\/2 Presentation Manager. Someone at IBM decided that all coordinate systems in PM\u2014including those for windows, graphics, and bitmaps\u2014should be consistent. This provoked a debate: Most people, including programmers who have worked with full-screen text programming or windowing environments, think in terms of vertical coordinates that increase going down the screen. However, hardcore computer graphics programmers approach the video display from a perspective that originates in the mathematics of analytic geometry. This involves a rectangular (or Cartesian) coordinate system where increasing vertical coordinates go up in space.<\/p>\n<p>In short, the mathematicians won. Everything in PM was saddled with a bottom-left origin, including window coordinates. And that&#8217;s how DIBs came to be this way. <a name=\"477\"><\/a><\/p><\/blockquote>\n<p>\ucd9c\ucc98 :<\/p>\n<p>https:\/\/kldp.org\/node\/154866<\/p>\n<p>https:\/\/www-user.tu-chemnitz.de\/~heha\/petzold\/ch15b.htm#bottoms%20Up<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BMP \ud30c\uc77c\uc744 \uc5f4\uc5b4\ubcf4\uba74 \ud30c\uc77c\uc548\uc758 \ub0b4\uc6a9\uc774 \uc0c1\ud558\ubc18\uc804\ub418\uc5b4 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4. \uadf8 \uc774\uc720\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4. \ucc98\uc74c\uc5d0 IBM(OS\/2)\uc5d0\uc11c \uc88c\ud45c \uccb4\uacc4 \ub9cc\ub4e4 \ub54c, \uc708\ub3c4\uc6b0, \uadf8\ub798\ud53d, \ube44\ud2b8\ub9f5 \ub4f1 \uc804\ubd80\ub2e4 \ud1b5\uc77c\uc131\uc744 \uac00\uc9c0\uae38 \uc6d0\ud588\ub2e4. \uc774\uc5d0 \ub2e4\uac19\uc774 \ubaa8\uc5ec \ud68c\uc758\ub97c \ud588\ub294\ub370, \ud504\ub85c\uadf8\ub798\uba38\ub97c \ube44\ub86f\ud55c \ub300\ubd80\ubd84\uc758 \uc0ac\ub78c\ub4e4\uc740 \uc704\ucabd\uc5d0\uc11c \uc544\ub798\ucabd\uc73c\ub85c \ub370\uc774\ud130\ub97c \ub098\ud0c0\ub0b4\uae38 \uc6d0\ud588\ub2e4. &hellip; <a href=\"http:\/\/pchero21.com\/?p=3850\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[842,1020],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3850"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3850"}],"version-history":[{"count":1,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3850\/revisions"}],"predecessor-version":[{"id":3851,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3850\/revisions\/3851"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3850"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}