diff --git a/pytesseract/pytesseract.py b/pytesseract/pytesseract.py index 04a3ab43..9ee25d57 100644 --- a/pytesseract/pytesseract.py +++ b/pytesseract/pytesseract.py @@ -42,6 +42,7 @@ RGB_MODE = 'RGB' SUPPORTED_FORMATS = { 'JPEG', + 'JPEG2000', 'PNG', 'PBM', 'PGM', diff --git a/tests/data/test.jpeg2000 b/tests/data/test.jpeg2000 new file mode 100644 index 00000000..9adea00c Binary files /dev/null and b/tests/data/test.jpeg2000 differ diff --git a/tests/pytesseract_test.py b/tests/pytesseract_test.py index b9058afc..ce88e95c 100644 --- a/tests/pytesseract_test.py +++ b/tests/pytesseract_test.py @@ -77,6 +77,7 @@ def test_file_small(): 'test_file', [ 'test.jpg', + 'test.jpeg2000', 'test.pgm', 'test.png', 'test.ppm', @@ -87,6 +88,7 @@ def test_file_small(): ], ids=[ 'jpg', + 'jpeg2000', 'pgm', 'png', 'ppm',