From c19f0b8fe4327f1546dc415fa62688fb75e62147 Mon Sep 17 00:00:00 2001 From: kurema Date: Thu, 16 Apr 2026 14:20:22 +0900 Subject: [PATCH 1/2] Add support for 'webp' image format --- src/ocr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocr.py b/src/ocr.py index f38a68b..3cb0d83 100644 --- a/src/ocr.py +++ b/src/ocr.py @@ -157,7 +157,7 @@ def process(args): for inputpath in rawinputpathlist: ext=inputpath.split(".")[-1] - if ext.lower() in ["jpg","png","tiff","jp2","tif","jpeg","bmp"]: + if ext.lower() in ["jpg","png","tiff","jp2","tif","jpeg","bmp","webp"]: inputpathlist.append(inputpath) if len(inputpathlist)==0: print("Images are not found.") From aeb41da54a4beda59c93039c95aad7f5fe7056b8 Mon Sep 17 00:00:00 2001 From: kurema Date: Thu, 16 Apr 2026 14:22:55 +0900 Subject: [PATCH 2/2] Add support for webp image format --- ndlocr-lite-gui/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndlocr-lite-gui/main.py b/ndlocr-lite-gui/main.py index 29ab8dc..6df2aae 100644 --- a/ndlocr-lite-gui/main.py +++ b/ndlocr-lite-gui/main.py @@ -1210,7 +1210,7 @@ def pick_directory_result(e: ft.FilePickerResultEvent): ext = filename.split(".")[-1].lower() # 対象の拡張子かチェック - if ext in ["jpg", "png", "tiff", "jp2", "tif", "jpeg", "bmp"]: + if ext in ["jpg", "png", "tiff", "jp2", "tif", "jpeg", "bmp","webp"]: all_files_to_process.append((full_path, "image")) elif ext == "pdf": all_files_to_process.append((full_path, "pdf"))