Skip to content

Commit 8406acd

Browse files
authored
feat(rapidocr_web): add webp support (#512)
1 parent 1a94bb1 commit 8406acd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocrweb/rapidocr_web/templates/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1 align="center">
1515
<div class='area'>
1616
<span class="btn-gen" onclick="javascript:$('#rapid_ocr').click();">试试你的图片?(可拖拽、粘贴、点击)</span>
1717
<input type="file" style="display: none;" name="pic" id="rapid_ocr"/>
18-
<span class="uplodNote">支持PNG、JPG、JPEG、BMP,图片大小不超过3M。</span>
18+
<span class="uplodNote">支持PNG、JPG、JPEG、BMP、WEBP,图片大小不超过3M。</span>
1919
</div>
2020
<br/>
2121
<div class="area">
@@ -100,7 +100,7 @@ <h1 align="center">
100100
let imageName = targetFile.name;
101101
let index = imageName.lastIndexOf('.');
102102
let extName = imageName.substr(index + 1);
103-
let imgArr = ['jpg', 'bmp', 'png', 'jpeg'];
103+
let imgArr = ['webp', 'jpg', 'bmp', 'png', 'jpeg'];
104104
if (!(imgArr.includes(extName.toLocaleLowerCase()))){
105105
alert("图像文件格式不支持!");
106106
return;

0 commit comments

Comments
 (0)