While dragging a little bit into canvas, I successfully upload into a canvas a cropped clip of the image of a djvu page into it.source, just to crash into a DOM exception "The canvas has been tainted by cross-origin data" while attempting do access to pixel data with both getImageData() and toDataURL() methods.
Again, it seems a CORS issue.
Am I wrong? Is there some doc about this issue?
Alex brollo
What browser, and do you have the code somewhere ? That makes assisting a lot easier.
Taking a wild guess based on your comments so far, if you are importing an <img> into a canvas, you might require the 'crossorigin' attribute to be set on that element. https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
DJ
On Wed, Jan 7, 2015 at 10:21 AM, Alex Brollo alex.brollo@gmail.com wrote:
While dragging a little bit into canvas, I successfully upload into a canvas a cropped clip of the image of a djvu page into it.source, just to crash into a DOM exception "The canvas has been tainted by cross-origin data" while attempting do access to pixel data with both getImageData() and toDataURL() methods.
Again, it seems a CORS issue.
Am I wrong? Is there some doc about this issue?
Alex brollo _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It's about https://it.wikisource.org/wiki/MediaWiki:Gadget-cornersAlpha.js, isn't it? This change https://it.wikisource.org/w/index.php?diff=1499050&oldid=1498642 should do the job.
Il 07/01/2015 10:21, Alex Brollo ha scritto:
While dragging a little bit into canvas, I successfully upload into a canvas a cropped clip of the image of a djvu page into it.source, just to crash into a DOM exception "The canvas has been tainted by cross-origin data" while attempting do access to pixel data with both getImageData() and toDataURL() methods.
Again, it seems a CORS issue.
Am I wrong? Is there some doc about this issue?
Alex brollo _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Ok, Ricordisamoa, it runs, thanks for suggestion.... and your boldness while reading my DIY js code ;-) ! Alex
2015-01-08 0:33 GMT+01:00 Ricordisamoa ricordisamoa@openmailbox.org:
It's about https://it.wikisource.org/wiki/MediaWiki:Gadget-cornersAlpha.js, isn't it? This change https://it.wikisource.org/w/index.php?diff=1499050&oldid= 1498642 should do the job.
Il 07/01/2015 10:21, Alex Brollo ha scritto:
While dragging a little bit into canvas, I successfully upload into a canvas a cropped clip of the image of a djvu page into it.source, just to crash into a DOM exception "The canvas has been tainted by cross-origin data" while attempting do access to pixel data with both getImageData() and toDataURL() methods.
Again, it seems a CORS issue.
Am I wrong? Is there some doc about this issue?
Alex brollo _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org