For a while I'm trying to convert an image hosted on Flickr to grayscale on the fly.
I've tried the javascript/canvas
solution but got caught by the same origin policy.
For this there's the $.getImageData solution but since it depends on another server I thought it won't be very reliable.
I decided to try convert the images on the server side. Using Rails.
My first option is convert the images to base64 using AciveSupport::Base64 before displaying them on a canvas
and then converting using javascript. That way I might trick the same origin policy. Just wondering how slow all this conversion will be every time someone loads the page.
The other option would be using something like Rmagick to do the trick. But I'm not sure if I can use RMagick without saving the converted image somewhere before linking it on my view.
Would be great to have some thoughts on this solutions since I'm a beginner and have no idea how wrong these implementations might be.