{"categories":["Ruby","Tips"],"provider_name":"Hatena Blog","height":"190","type":"rich","published":"2019-03-18 00:00:00","provider_url":"https://hatena.blog","url":"https://shinkufencer.hateblo.jp/entry/2019/03/18/000000","blog_url":"https://shinkufencer.hateblo.jp/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2019%2F03%2F18%2F000000\" title=\"ruby\u3067png\u753b\u50cf\u3092BASE64\u5316\u3057\u3066HTML\u306b\u8cbc\u308a\u4ed8\u3051\u308b - \u30b3\u30fc\u30c9\u65e5\u9032\u6708\u6b69\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/shinkufencer/","width":"100%","description":"\u8a71\u306b\u306f\u805e\u3044\u3066\u3044\u305f\u304c\u3084\u3063\u305f\u3053\u3068\u306a\u3044\u306e\u3067\u3084\u3063\u3066\u307f\u308b\u3002 \u74b0\u5883 $ ruby -v ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin18] \u3084\u308a\u65b9 png\u753b\u50cf\u3092BASE64\u306b\u5909\u63db\u3059\u308b \u3053\u3093\u306a\u611f\u3058\u3067\u5bfe\u8c61\u753b\u50cf\u3092target.png\u3068\u3044\u3046\u540d\u524d\u3067\u914d\u7f6e $ tree . \u251c\u2500\u2500 convert.rb \u2514\u2500\u2500 target.png convert.rb\u306f\u4ee5\u4e0b require 'base64' binary_data = File.read(\"target.png\") p Base64.strict_encode64(binary_data) \u5b9f\u884c\u3059\u308b\u3068\u2026","blog_title":"\u30b3\u30fc\u30c9\u65e5\u9032\u6708\u6b69","title":"ruby\u3067png\u753b\u50cf\u3092BASE64\u5316\u3057\u3066HTML\u306b\u8cbc\u308a\u4ed8\u3051\u308b","image_url":null,"author_name":"shinkufencer"}