Google的"报告错误"或"反馈工具"可让您选择浏览器窗口的某个区域,以创建提交的屏幕截图,其中包含有关错误的反馈.
Jason Small截图,发布在一个重复的问题.
他们是怎么做到的?谷歌的JavaScript反馈API从此处加载,他们对反馈模块的概述将演示屏幕截图功能.
鉴于两个不同的图像文件(我选择的任何格式),我需要编写一个程序来预测一个程序是否是另一个的非法副本.副本的作者可以执行诸如旋转,制作否定或添加琐碎细节(以及更改图像的尺寸)之类的内容.
你知道做这种工作的算法吗?
我有一个非常溢出的div.它基本上包括一个大的组织结构图.我想要做的是用html2canvas库导出div的整个内容而不是可见部分,但到目前为止我无法实现它.下面的代码片段不会呈现完整的内容.有没有办法实现它?
function export(){
html2canvas( [ document.getElementById('diagram') ], {
onrendered: function(canvas) {
var dataUrl = canvas.toDataURL();
window.open(dataUrl, "toDataURL() image", "width=800, height=800");
//Canvas2Image.saveAsPNG(canvas);
}
});
}
Run Code Online (Sandbox Code Playgroud)
我正在使用BasicPrimitives库来生成组织结构图.它需要一个div并插入所有元素.由于我的图表中等大,它从容器中溢出.Xhtml代码如下:
<rich:panel style="float: left; width: 100%;">
<div style="float: left; height:600px; margin-left: 1%; width: 19%; border-style: dotted; border-width:1px;">
Some irrelevant content
</div>
<div id="diagram" class='diagram' style="float: right; height:600px; width: 59%; border-style: dotted; border-width:1px;">
This is the div all charts are dynamically inserted
</div>
<div style="float: left; height:600px; margin-left: 1%; width: 19%; border-style: dotted; border-width:1px;">
Some more irrelevant …Run Code Online (Sandbox Code Playgroud)