1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-12 07:53:18 +00:00

add jpeg2000 (#828)

This commit is contained in:
Alex Xu
2025-02-19 16:29:26 -08:00
committed by GitHub
parent 02535421a0
commit 2e39a8c227
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class HTMLStripper(HTMLParser):
def getImageFileName(imgfile):
name, ext = os.path.splitext(imgfile)
ext = ext.lower()
if (name.startswith('.') and len(name) == 1) or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']:
if (name.startswith('.') and len(name) == 1) or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.jp2', '.j2k', '.jpx']:
return None
return [name, ext]