I managed to get what seems to be a PNG file saved using an actual URL
to the image:
File.open 'image.png', 'w' do |file|
open('http://link_to_image.png').path { |chunk| file.write chunk }
end
Notice the .png extension which is not present with the Google charts
URL.
This did save image.png to the file system, however the image is
invalid. So this did not work even for a straight link to a PNG image.
I'm not going to have to use ImageMagick am I? Please tell me no...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.