{"id":1879,"date":"2011-01-31T13:57:24","date_gmt":"2011-01-30T19:57:24","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/1879"},"modified":"2011-01-31T14:00:33","modified_gmt":"2011-01-31T05:00:33","slug":"%e5%86%99%e7%9c%9f%e3%81%ab%e3%83%9e%e3%82%b9%e3%82%af%e3%82%92%e3%81%8b%e3%81%91%e3%81%a6%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e3%82%92%e3%81%99%e3%82%8b-2","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/1879","title":{"rendered":"\u5199\u771f\u306b\u30de\u30b9\u30af\u3092\u304b\u3051\u3066\u5207\u308a\u629c\u304d\u3092\u3059\u308b"},"content":{"rendered":"<p>\n\u4e45\u3057\u632f\u308a\u306b\u3001\u7f8e\u5973Linux http:\/\/bijo-linux.com \u306e\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u4f5c\u6210\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u81ea\u4f53\u3092\u30cf\u30fc\u30c8\u30de\u30fc\u30af\u306b\u3057\u3066\u3057\u307e\u304a\u3046\u3068\u3044\u3046\u4f01\u753b\u3067\u3001\u51fa\u6765\u4e0a\u304c\u308a\u306f\u3053\u3093\u306a\u611f\u3058\u3002\n<\/p>\n<p>\n<script src=\"http:\/\/bijo-linux.com\/bp\/js\/bijo-feb-0.9.js\"><\/script>\n<\/p>\n<p>\n\u3053\u3053\u306e\u30d6\u30ed\u30b0\u3060\u3068\u3001\u80cc\u666f\u304c\u767d\u306a\u306e\u3067\u5909\u308f\u308a\u6620\u3048\u3057\u307e\u305b\u3093\u304c\u3001\u8272\u304c\u3064\u3044\u3066\u3044\u305f\u308a\u753b\u50cf\u304c\u8cbc\u3063\u3066\u3042\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u900f\u904e\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u3088\u304f\u308f\u304b\u308a\u307e\u3059\u3002\n<\/p>\n<p><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/01\/wpid-dworkblogimage20110131_012.jpg'\/><\/p>\n<p>\n\u3055\u3066\u3001\u3053\u308c\u3092\u3069\u3046\u5b9f\u73fe\u3059\u308b\u306e\u304b\u3068\u8a00\u3046\u3068\u3001\u3063\u3066\u975e\u5e38\u306b\u7c21\u5358\u3067\u3002\n<\/p>\n<ul>\n<li>\u30cf\u30fc\u30c8\u30de\u30fc\u30af\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/li>\n<li>\u30cf\u30fc\u30c8\u30de\u30fc\u30af\u306b\u5207\u308a\u629c\u3044\u305f\u5199\u771f\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/li>\n<li>\u305d\u3057\u3066\u91cd\u306d\u5408\u308f\u305b<\/li>\n<\/ul>\n<p>\n\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002\u666e\u901a\u3001\u5199\u771f\u306e\u307b\u3046\u306f\u56db\u89d2\u5f62\u3060\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u81ea\u8eab\u3082\u56db\u89d2\u5f62\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u3059\u304c\u3001\u5143\u306e\u5199\u771f\u304b\u3089\u5207\u308a\u629c\u3044\u3066\u3057\u307e\u3048\u3070\u3001\u91cd\u306d\u5408\u308f\u305b\u306e\u3068\u304d\u306b\u4e21\u65b9\u3068\u3082\u80cc\u666f\u304c\u6295\u4e0b\u3055\u308c\u307e\u3059\u3002\n<\/p>\n<p>\n\u25bc\u5207\u308a\u629c\u3044\u305f\u5199\u771f<br \/>\n<img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/01\/wpid-dworkblogimage20110131_02.jpg'\/>\n<\/p>\n<p>\n\u25bc\u30d5\u30ec\u30fc\u30e0\u753b\u50cf<br \/>\n<img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/01\/wpid-dworkblogimage20110131_03.jpg'\/>\n<\/p>\n<p>\n\u306e\u91cd\u306d\u5408\u308f\u305b\u3067\u3059\u3002\n<\/p>\n<p>\n\u3055\u3066\u3001\u3053\u306e\u5207\u308a\u629c\u3044\u305f\u753b\u50cf\u3092\u3069\u3046\u4f5c\u308b\u304b\u3068\u3044\u3046\u3068\u3001\u30de\u30b9\u30af\u753b\u50cf\u3068\u306e\u91cd\u306d\u5408\u308f\u305b\u306b\u306a\u308b\u308f\u3051\u3067\u3059\u304c\u3001\n<\/p>\n<p>\n\u25bc\u5143\u306e\u5199\u771f<br \/>\n<img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/01\/wpid-dworkblogimage20110131_04.jpg'\/>\n<\/p>\n<p>\n\u25bc\u30de\u30b9\u30af\u753b\u50cf<br \/>\n<img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/01\/wpid-dworkblogimage20110131_05.jpg'\/>\n<\/p>\n<p>\n\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u308c\u3092\u4f7f\u3063\u3066\u3001\u3061\u307e\u3061\u307e\u753b\u50cf\u30c4\u30fc\u30eb\u3067\u3084\u3063\u3066\u3082\u3044\u3044\u3093\u3067\u3059\u304c&#8230;\u3061\u3087\u3063\u3068\u305d\u308c\u306f\u7121\u7406\u30c3!!! \u306a\u306e\u3067\u3001\u30de\u30b9\u30af\u3059\u308b\u3060\u3051\u306e\u30c4\u30fc\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\npublic class ImageOverlay\r\n{\r\n    public bool OverlayMask(string photofile, string maskfile, string outfile)\r\n    {\r\n        try\r\n        {\r\n            Bitmap photo = new Bitmap(photofile);\r\n            Bitmap mask = new Bitmap(maskfile);\r\n            Bitmap output = this.OverlayMask(photo, mask);\r\n            if (output == null)\r\n            {\r\n                return false;\r\n            }\r\n            output.Save(outfile);\r\n            return true;\r\n        }\r\n        catch\r\n        {\r\n            Console.WriteLine(&amp;quot;can&#039;t make overlay file&amp;quot;); \r\n            return false;\r\n        }\r\n    }\r\n    public Bitmap OverlayMask(Bitmap bmpPhoto, Bitmap bmpMask)\r\n    {\r\n        int width = bmpPhoto.Width;\r\n        int height = bmpPhoto.Height;\r\n        Bitmap bmpOutput = new Bitmap(width, height, PixelFormat.Format32bppArgb);\r\n\r\n        for (int y = 0; y &lt; width; y++)\r\n        {\r\n            for (int x = 0; x &lt; height; x++)\r\n            {\r\n                Color photo = bmpPhoto.GetPixel(x, y);\r\n                byte red = bmpMask.GetPixel(x, y).R;\r\n                byte alpha = (byte)(255 - red);\r\n                Color mask = Color.FromArgb(alpha, photo);\r\n                bmpOutput.SetPixel(x, y, mask);\r\n            }\r\n        }\r\n        return bmpOutput;\r\n    }\r\n}\r\n<\/pre>\n<ul>\n<li>photo: \u5143\u753b\u50cf<\/li>\n<li>mask:  \u30de\u30b9\u30af\u753b\u50cf<\/li>\n<li>output: \u51fa\u529b\u753b\u50cf<\/li>\n<\/ul>\n<p>\n\u3063\u3066\u306a\u8a33\u3067\u3001\u3061\u307e\u3061\u307e\u30681\u30c9\u30c3\u30c8\u305a\u3064\u91cd\u306d\u5408\u308f\u305b&#8230;\u3063\u3066\u3001\u306a\u3093\u304b\u3044\u3044\u65b9\u6cd5\u306a\u3044\u3067\u3059\u304b\u306d\uff1f\n<\/p>\n<p>\nImageAttributes \u30af\u30e9\u30b9 (System.Drawing.Imaging)<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/h4f66d59.aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/h4f66d59.aspx<\/a>\n<\/p>\n<p>\n\u3042\u305f\u308a\u3067\u3001alpha \u30c1\u30e3\u30f3\u30cd\u30eb\u3092\u5909\u3048\u308b\u3060\u3051\u3067\u3044\u3044\u3068\u601d\u3046\u3060\u3051\u3069\u3001\u307e\u3042\u3001\u3053\u308c\u3067\u3082\u305d\u308c\u306a\u308a\u306e\u30b9\u30d4\u30fc\u30c9\u304c\u51fa\u3066\u3044\u308b\u306e\u3067\u826f\u3057\u3068\u3057\u307e\u3059\u304b(\u753b\u50cf\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u3061\u3087\u3063\u3068\u30a2\u30ec\u306a\u3093\u3067\u3057\u3087\u3046\u304c)\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3057\u632f\u308a\u306b\u3001\u7f8e\u5973Linux http:\/\/bijo-linux.com \u306e\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u4f5c\u6210\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u81ea\u4f53\u3092\u30cf\u30fc\u30c8\u30de\u30fc\u30af\u306b\u3057\u3066\u3057\u307e\u304a\u3046\u3068\u3044\u3046\u4f01\u753b\u3067\u3001\u51fa\u6765\u4e0a\u304c\u308a\u306f\u3053\u3093\u306a\u611f\u3058\u3002 \u3053\u3053\u306e\u30d6\u30ed\u30b0\u3060\u3068\u3001\u80cc\u666f\u304c\u767d\u306a\u306e &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/1879\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,16],"tags":[],"class_list":["post-1879","post","type-post","status-publish","format-standard","hentry","category-dev","category-blogpart"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=1879"}],"version-history":[{"count":3,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1879\/revisions"}],"predecessor-version":[{"id":1882,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1879\/revisions\/1882"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=1879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=1879"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=1879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}