Abstracted the stripes method so you don't have to call it on an img element, but can instead just get the src as a dataURL and assign it where you please.
Added a fiddle for the new use case