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")) 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.")