本文介绍了getImageData导致“Uncaught Error:NOT_SUPPORTED_ERR:DOM Exception 9”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在HTML5中感受一些图像处理。我发现当我尝试使用getImageData方法时,我会抛出这个JS异常。我正在使用Chrome并在localhost上运行。
I'm trying to get a feel for some image manipulation in HTML5. I am finding that when I try and use the getImageData method I get this JS exception thrown. I am using Chrome and running on localhost.
谢谢!
推荐答案
好的找出问题所在。我要说的只是derp。我正在使用
Okay figured out what the problem was. All I have to say is "derp". I was using
getImageData(x, x)
但我打算使用它的方式需要4个参数
but the way I was intending to use this requires 4 arguments
getImageData(x,x,x,x)
这篇关于getImageData导致“Uncaught Error:NOT_SUPPORTED_ERR:DOM Exception 9”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!