♣ Tech & Biz Salon/Tech

tainted canvases may not be exported

TasteGod 2014. 2. 21. 17:57


Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': tainted canvases may not be exported.
 

브라우저 콘솔에 찍힌 에러메시지이다.

tainted --- 대략... 오염되었다 라는 느낌인데.. cross-domain image 일때도 이에 해당된다고 한다. 뭐 이런 부분까지 시큐리티가 강한지... 넘 몸사리는거 아닌가... 싶다...  근데 입장을 바꿔 생각해보니 이유는 추측이 가긴 하네...


http://stackoverflow.com/questions/10852514/javascript-html5-drawimage-with-image-from-a-different-domain

여기에 설명이 잘 되어 있다.


나는 크로스도메인 이미지를  배경 캔버스 박아놓고, 다른 드로잉 캔버스랑 모두 같이 캡쳐를 하는데...

그때 저게 발생한다.


여차저차 결국 파일처리쪽의 서버와 화이트보드쪽 서버와 합쳐야 할듯...