Skip to content

📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

feat(rapidocr_web): add webp support (#512)

Nate River8406acdee90e
diff --git a/ocrweb/rapidocr_web/templates/index.html b/ocrweb/rapidocr_web/templates/index.html
index 9453835..a7c95d1 100644
--- a/ocrweb/rapidocr_web/templates/index.html
+++ b/ocrweb/rapidocr_web/templates/index.html
@@ -15,7 +15,7 @@
<div class='area'>
<span class="btn-gen" onclick="javascript:$('#rapid_ocr').click();">试试你的图片?(可拖拽、粘贴、点击)</span>
<input type="file" style="display: none;" name="pic" id="rapid_ocr"/>
- <span class="uplodNote">支持PNG、JPG、JPEG、BMP,图片大小不超过3M。</span>
+ <span class="uplodNote">支持PNG、JPG、JPEG、BMP、WEBP,图片大小不超过3M。</span>
</div>
<br/>
<div class="area">
@@ -100,7 +100,7 @@
let imageName = targetFile.name;
let index = imageName.lastIndexOf('.');
let extName = imageName.substr(index + 1);
- let imgArr = ['jpg', 'bmp', 'png', 'jpeg'];
+ let imgArr = ['webp', 'jpg', 'bmp', 'png', 'jpeg'];
if (!(imgArr.includes(extName.toLocaleLowerCase()))){
alert("图像文件格式不支持!");
return;