如何在WebOS中从图像中获取像素?
我有图像,我必须读取该图像的所有像素值。我必须在 webOS 中做到这一点。有哪些方法可以做到这一点?
Am having am image, i have to read all the pixel values of that image. And i have to do it in webOS. What are the ways to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题与我回答的另一个问题有些相似
总之,此示例查找 (5,2) 处像素的绿色分量:
This question is somewhat similar to another one, which I answered here. Basically, you'll want to draw that image to a canvas, use
getImageData
to get the pixel array, and then just access the pixel within the array.In summary, this example finds the green component of the pixel at (5,2):