java 图片识别 html5,HTMLUnit是否包含能够将图像数据渲染回Java代码的功能性[HTML5]画布2D实现?...

Basically, I'd like to be able to retrieve the HTMl[5] canvas image data created from, normal, JavaScript-based in-browser scripting. I'd like to do this in the context of a screen-scraping-type environment, from within [pure] Java code. HTMLUnit appears to fit some of the requirements.

How would I go about retrieving the canvas-rendered image data, and how complete, or not, might HTMLUnit's canvas implementation currently be (version 2.13 at time of writing)?

Two (2) HTMlUnit classes of note, might be:

com.gargoylesoftware.htmlunit.html.HtmlCanvas

com.gargoylesoftware.htmlunit.javascript.host.canvas.CanvasRenderingContext2D

解决方案

Well [answering my own question], as far as can see, no, there is not a functioning HTML Canvas implementation, as of HTMLUnit version 2.13 (November 2013).

Interestingly, it might be useful to integrate the following HTML Canvas (2D) open-source solution into HTMLUnit, in order to render canvas-based graphics:

It should also be possible to create a WebGL canvas context by appropriating the WebGL interface/class code from something like the gwtGL project, and implementing a 3D layer atop of an existing OpenGL 2.0 Java library.

Can I haz some points now?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值