更新tif解析文件 更加自能错误提醒
更新tif解析文件 更加自能错误提醒 Signed-off-by: 高雄 <admin@cxcp.com>
This commit is contained in:
parent
8f37e85aa6
commit
b010e13de2
|
@ -43,7 +43,51 @@
|
|||
imageData = ctx.createImageData(canvas.width, canvas.height);
|
||||
} catch(e){
|
||||
console.log("错误:" + e);
|
||||
alert("文件错误/或文件类型不正确,修改正确的文件类型比如后缀名为JPG!");
|
||||
var html = "";
|
||||
html += "<head>";
|
||||
html += " <meta charset=\"utf-8\"/>";
|
||||
html += " <style type=\"text/css\">";
|
||||
html += " body {";
|
||||
html += " margin: 0 auto;";
|
||||
html += " width: 900px;";
|
||||
html += " background-color: #CCB;";
|
||||
html += " }";
|
||||
html += "";
|
||||
html += " .container {";
|
||||
html += " width: 700px;";
|
||||
html += " height: 700px;";
|
||||
html += " margin: 0 auto;";
|
||||
html += " }";
|
||||
html += "";
|
||||
html += " img {";
|
||||
html += " width: auto;";
|
||||
html += " height: auto;";
|
||||
html += " max-width: 100%;";
|
||||
html += " max-height: 100%;";
|
||||
html += " padding-bottom: 36px;";
|
||||
html += " }";
|
||||
html += "";
|
||||
html += " span {";
|
||||
html += " display: block;";
|
||||
html += " font-size: 20px;";
|
||||
html += " color: blue;";
|
||||
html += " }";
|
||||
html += " </style>";
|
||||
html += "</head>";
|
||||
html += "";
|
||||
html += "<body>";
|
||||
html += "<div class=\"container\">";
|
||||
html += " <img src=\"images/sorry.jpg\"/>";
|
||||
html += " <span>";
|
||||
html += " 该(tif)文件,系统解析错误,具体原因如下:";
|
||||
html += " <p style=\"color: red;\">文件[${file.name}]解析失败,请联系系统管理员</p>";
|
||||
html += " </span>";
|
||||
html += " <p>有任何疑问,请加入kk开源社区知识星球咨询:<a href=\"https://t.zsxq.com/09ZHSXbsQ\">https://t.zsxq.com/09ZHSXbsQ</a><br></p>";
|
||||
html += "</div>";
|
||||
html += "</body>";
|
||||
html += "</html>";
|
||||
document.write(html);
|
||||
document.close();
|
||||
}
|
||||
for (let i = 0; i < rgba.length; i++) {
|
||||
imageData.data[i] = rgba[i];
|
||||
|
|
Loading…
Reference in New Issue