diff --git a/.reuse/dep5 b/.reuse/dep5 index 28d40eef..70fc3eee 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -52,7 +52,6 @@ Copyright: (C) 2012 SmokeyJoe License: GFDL-1.2-or-later or CC-BY-SA-3.0 Files: tests/resources/c02-22.pdf - tests/resources/congress.jpg tests/resources/multipage.pdf Copyright: Public domain License: public-domain diff --git a/tests/resources/README.rst b/tests/resources/README.rst index c83990ee..a1aa4044 100644 --- a/tests/resources/README.rst +++ b/tests/resources/README.rst @@ -19,9 +19,6 @@ the copyright holder(s) and license(s) applicable to these resources. * - c02-22.pdf - `Project Gutenberg`_, Adventures of Huckleberry Finn, page 22 - difficult OCR image (obscure fonts and illustrations) - * - congress.jpg - - `US Congressional Records`_ - - difficult OCR image (color background) * - graph.pdf - `Wikimedia:Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png`_ - image with slanted text @@ -125,8 +122,6 @@ These test resources are assemblies or derivatives from other previously mention .. _`Project Gutenberg`: https://www.gutenberg.org/files/76/76-h/76-h.htm#c2 -.. _`US Congressional Records`: http://www.baxleystamps.com/litho/meiji/courts_1871.jpg - .. _`Wikimedia: Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png`: https://en.wikipedia.org/wiki/File:Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png .. _`Wikimedia: JPEG2000 Lichtenstein`: https://en.wikipedia.org/wiki/JPEG_2000#/media/File:Jpeg2000_2-level_wavelet_transform-lichtenstein.png diff --git a/tests/resources/baiona_color.jpg b/tests/resources/baiona_color.jpg new file mode 100644 index 00000000..7662b692 Binary files /dev/null and b/tests/resources/baiona_color.jpg differ diff --git a/tests/resources/congress.jpg b/tests/resources/congress.jpg deleted file mode 100644 index 8bc6f638..00000000 Binary files a/tests/resources/congress.jpg and /dev/null differ diff --git a/tests/test_image_input.py b/tests/test_image_input.py index ef3702fe..93d9b4e0 100644 --- a/tests/test_image_input.py +++ b/tests/test_image_input.py @@ -75,7 +75,7 @@ def test_img2pdf_fails(resources, no_outpdf): @pytest.mark.xfail(reason="remove background disabled") def test_jpeg_in_jpeg_out(resources, outpdf): check_ocrmypdf( - resources / 'congress.jpg', + resources / 'baiona_color.jpg', outpdf, '--image-dpi', '100', diff --git a/tests/test_main.py b/tests/test_main.py index 524f74e2..4059a21b 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -623,7 +623,7 @@ def test_no_contents(resources, outpdf): @pytest.mark.parametrize( - 'image', ['baiona.png', 'baiona_gray.png', 'baiona_alpha.png', 'congress.jpg'] + 'image', ['baiona.png', 'baiona_gray.png', 'baiona_alpha.png', 'baiona_color.jpg'] ) def test_compression_preserved(ocrmypdf_exec, resources, image, outpdf): input_file = str(resources / image) @@ -679,7 +679,7 @@ def test_compression_preserved(ocrmypdf_exec, resources, image, outpdf): [ ('baiona.png', 'jpeg'), ('baiona_gray.png', 'lossless'), - ('congress.jpg', 'lossless'), + ('baiona_color.jpg', 'lossless'), ], ) def test_compression_changed(ocrmypdf_exec, resources, image, compression, outpdf): diff --git a/tests/test_preprocessing.py b/tests/test_preprocessing.py index b9975f41..a91c29ba 100644 --- a/tests/test_preprocessing.py +++ b/tests/test_preprocessing.py @@ -46,11 +46,11 @@ def test_deskew_blank_page(resources, outpdf): @pytest.mark.xfail(reason="remove background disabled") def test_remove_background(resources, outdir): # Ensure the input image does not contain pure white/black - with Image.open(resources / 'congress.jpg') as im: + with Image.open(resources / 'baiona_color.jpg') as im: assert im.getextrema() != ((0, 255), (0, 255), (0, 255)) output_pdf = check_ocrmypdf( - resources / 'congress.jpg', + resources / 'baiona_color.jpg', outdir / 'test_remove_bg.pdf', '--remove-background', '--image-dpi',