<html>
<body style="margin: 0px">
<img border="0" src="data:img/png;base64,<%= img %>">
</body>
</html>
require 'open-uri'
require 'base64'
require 'erb'
src = open('http://www.mysql.com/common/logos/logo-mysql-110x57.png')
img = Base64.encode64(src.read).gsub("\n", "")
erb = File.read("layout.erb", :encoding => Encoding::UTF_8)
ERB.new(erb).run
ruby generate.rb > image.html