Skip to content

Instantly share code, notes, and snippets.

@hashrocketeer
Created July 30, 2012 19:01
Show Gist options
  • Save hashrocketeer/3209188 to your computer and use it in GitHub Desktop.
Save hashrocketeer/3209188 to your computer and use it in GitHub Desktop.
base64 string to image
# http://stackoverflow.com/questions/1160741/how-to-save-a-base64-string-as-an-image-using-ruby
File.open('shipping_label.gif', 'wb') do|f|
f.write(Base64.decode64(base_64_encoded_data))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment