Re: Seeking use cases for knowing the currently selected source

Hi Daniel, 

On Friday, 30 November 2012 at 22:15, Konopacki, Daniel wrote:

> I asked within Disney and am hoping for some more responses. At the
> moment, though, I did get this from ESPN:
> 
> "One use-case of needing the selected source URL from the <picture> tag is
> if you wanted to create a responsive <canvas> where you are loading an
> image and manipulating the data."
> 
> Similar in concept to this:
> http://www.html5rocks.com/en/tutorials/canvas/integrating/#toc-manip

Thanks for this use case. I need to experiment with this one a bit, as the canvas in the example in the article takes the img as an input (rather than a URL):

context2.drawImage(img2,0,0);

In that case, you can get away with not knowing what the source is, as the canvas will just be overlaid with whatever image data the img element contains. 

Can anyone with experience working with canvas please comment.


-- 
Marcos Caceres
http://datadriven.com.au

Received on Saturday, 1 December 2012 13:10:02 UTC