{"id":557,"date":"2012-06-28T09:08:00","date_gmt":"2012-06-28T00:08:00","guid":{"rendered":"http:\/\/gam.ebb.jp\/b\/?p=557"},"modified":"2016-04-02T23:10:06","modified_gmt":"2016-04-02T14:10:06","slug":"unity-texture2dpng","status":"publish","type":"post","link":"http:\/\/gam.ebb.jp\/b\/?p=557","title":{"rendered":"Unity\u899a\u66f8 Texture2D\u306ePNG\u5909\u63db"},"content":{"rendered":"<p>\u81ea\u5206\u7528\u30e1\u30e2\u3067\u3059\u3002(\u9032\u884c\u4e2d)<\/p>\n<p>\u25a0Texture2D\u3092PNG\u306b\u5909\u63db\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u65b9\u6cd5<br \/>\n\u30fbUnity Script Reference \u2013 Texture2D.EncodeToPNG <br \/>\nhttp:\/\/docs.unity3d.com\/Documentation\/ScriptReference\/Texture2D.EncodeToPNG.html<\/p>\n<p>\u2606Application.dataPath\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\/Data\u3092\/Documents<br \/>\n\u306b\u5909\u63db\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u305d\u3046\u306a\u3002<br \/>\n\u30fb\u30af\u30ea\u30a8\u30a4\u30c8\u30a6\u30a7\u30fc\u30d6\u958b\u767a\u65e5\u8a18<br \/>\nUnity 3D http:\/\/createwave.blog104.fc2.com\/blog-category-10.html<\/p>\n<p>\u2606Android\u3067\u3082iOS\u3067\u3082\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u4e0b\u8a18\u304c\u4f7f\u3048\u305d\u3046\uff1f<br \/>\n\u30fbApplication.persistentDataPath<br \/>\nhttp:\/\/www.previewlabs.com\/file-io-in-unity3d\/<\/p>\n<p>\n\u2606EncodeToPNG\u3092\u4f7f\u3063\u305f\u969b<br \/>\nYou can make the texture readable in the Texture Import Settings.<br \/>\n\u3068\u8a00\u308f\u308c\u3066\u753b\u50cf\u304c\u8aad\u307f\u8fbc\u3081\u306a\u3044\u5834\u5408\u306e\u5bfe\u51e6\u65b9\u6cd5\u3002<\/p>\n<p>\u8aad\u307f\u8fbc\u3081\u306a\u3044\u753b\u50cf\u306eInspector\u3067\u4e0b\u8a18\u8a2d\u5b9a\u3092\u3059\u308b\u3002<br \/>\nTexture Type -> Advance<br \/>\nRead\/Write Enabled -> Check<\/p>\n<p>http:\/\/answers.unity3d.com\/questions\/25775\/trying-to-access-a-textures-pixel-coords.html<\/p>\n<p>\u2606\u753b\u50cf\u3092\u30a2\u30eb\u30d0\u30e0\u306b\u4fdd\u5b58\u3059\u308b\u65b9\u6cd5<br \/>\niOS:<br \/>\nPlugin\u3092\u4f5c\u3063\u3066\u3001UIImageWriteToSavedPhotosAlbum\u3092\u547c\u3076\u3002<br \/>\nhttp:\/\/mthr.blogspot.jp\/2009\/10\/iphoneuiimagewritetosavedphotosalbum.html<br \/>\n\u53d6\u308a\u6562\u3048\u305a\u3001Texture2D\u3092\u30ab\u30e1\u30e9\u30ed\u30fc\u30eb\u306b\u4fdd\u5b58\u3067\u304d\u305f\u3002\u76ee\u8336\u76ee\u8336\u6642\u9593\u639b\u304b\u3063\u305f\u3067\u3059\u3002<\/p>\n<p>Android:<br \/>\n\u307e\u3060<\/p>\n<p><\/p>\n<div class=\"veu_socialSet veu_socialSet-position-after veu_contentAddSection\"><script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src=\"https:\/\/platform.twitter.com\/widgets.js\";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,\"script\",\"twitter-wjs\"));<\/script><ul><li class=\"sb_facebook sb_icon\"><a class=\"sb_icon_inner\" href=\"\/\/www.facebook.com\/sharer.php?src=bm&u=http%3A%2F%2Fgam.ebb.jp%2Fb%2F%3Fp%3D557&amp;t=Unity%E8%A6%9A%E6%9B%B8%20Texture2D%E3%81%AEPNG%E5%A4%89%E6%8F%9B%20%7C%20Gam.eBB%E3%83%96%E3%83%AD%E3%82%B0\" target=\"_blank\" onclick=\"window.open(this.href,'FBwindow','width=650,height=450,menubar=no,toolbar=no,scrollbars=yes');return false;\"><span class=\"vk_icon_w_r_sns_fb icon_sns\"><\/span><span class=\"sns_txt\">Facebook<\/span><span class=\"veu_count_sns_fb\"><\/span><\/a><\/li><li class=\"sb_twitter sb_icon\"><a class=\"sb_icon_inner\" href=\"\/\/twitter.com\/intent\/tweet?url=http%3A%2F%2Fgam.ebb.jp%2Fb%2F%3Fp%3D557&amp;text=Unity%E8%A6%9A%E6%9B%B8%20Texture2D%E3%81%AEPNG%E5%A4%89%E6%8F%9B%20%7C%20Gam.eBB%E3%83%96%E3%83%AD%E3%82%B0\" target=\"_blank\" ><span class=\"vk_icon_w_r_sns_twitter icon_sns\"><\/span><span class=\"sns_txt\">twitter<\/span><\/a><\/li><li class=\"sb_hatena sb_icon\"><a class=\"sb_icon_inner\" href=\"\/\/b.hatena.ne.jp\/add?mode=confirm&url=http%3A%2F%2Fgam.ebb.jp%2Fb%2F%3Fp%3D557&amp;title=Unity%E8%A6%9A%E6%9B%B8%20Texture2D%E3%81%AEPNG%E5%A4%89%E6%8F%9B%20%7C%20Gam.eBB%E3%83%96%E3%83%AD%E3%82%B0\" target=\"_blank\"  onclick=\"window.open(this.href,'Hatenawindow','width=650,height=450,menubar=no,toolbar=no,scrollbars=yes');return false;\"><span class=\"vk_icon_w_r_sns_hatena icon_sns\"><\/span><span class=\"sns_txt\">Hatena<\/span><span class=\"veu_count_sns_hb\"><\/span><\/a><\/li><li class=\"sb_pocket sb_icon\"><a class=\"sb_icon_inner\"  href=\"\/\/getpocket.com\/edit?url=http%3A%2F%2Fgam.ebb.jp%2Fb%2F%3Fp%3D557&title=Unity%E8%A6%9A%E6%9B%B8%20Texture2D%E3%81%AEPNG%E5%A4%89%E6%8F%9B%20%7C%20Gam.eBB%E3%83%96%E3%83%AD%E3%82%B0\" target=\"_blank\"  onclick=\"window.open(this.href,'Pokcetwindow','width=650,height=450,menubar=no,toolbar=no,scrollbars=yes');return false;\"><span class=\"vk_icon_w_r_sns_pocket icon_sns\"><\/span><span class=\"sns_txt\">Pocket<\/span><span class=\"veu_count_sns_pocket\"><\/span><\/a><\/li><li class=\"sb_copy sb_icon\"><button class=\"copy-button sb_icon_inner\"data-clipboard-text=\"Unity\u899a\u66f8 Texture2D\u306ePNG\u5909\u63db | Gam.eBB\u30d6\u30ed\u30b0 http:\/\/gam.ebb.jp\/b\/?p=557\"><span class=\"vk_icon_w_r_sns_copy icon_sns\"><i class=\"fas fa-copy\"><\/i><\/span><span class=\"sns_txt\">Copy<\/span><\/button><\/li><\/ul><\/div><!-- [ \/.socialSet ] -->","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5206\u7528\u30e1\u30e2\u3067\u3059\u3002(\u9032\u884c\u4e2d) \u25a0Texture2D\u3092PNG\u306b\u5909\u63db\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u65b9\u6cd5 \u30fbUnity Script Reference \u2013 Texture2D.EncodeToPNG http:\/\/docs.unity [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":724,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/posts\/557"}],"collection":[{"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=557"}],"version-history":[{"count":1,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions"}],"predecessor-version":[{"id":684,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions\/684"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=\/wp\/v2\/media\/724"}],"wp:attachment":[{"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=557"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gam.ebb.jp\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}