Skip to content

Commit 1b5abea

Browse files
authored
Merge pull request #6477 from radarhere/libtiff
Increased test tolerance to allow for libtiff with libjpeg-turbo
2 parents 7591395 + 101f115 commit 1b5abea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/test_file_libtiff.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,15 +856,15 @@ def test_strip_cmyk_16l_jpeg(self):
856856
def test_strip_ycbcr_jpeg_2x2_sampling(self):
857857
infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif"
858858
with Image.open(infile) as im:
859-
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)
859+
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1.2)
860860

861861
@mark_if_feature_version(
862862
pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
863863
)
864864
def test_strip_ycbcr_jpeg_1x1_sampling(self):
865865
infile = "Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif"
866866
with Image.open(infile) as im:
867-
assert_image_equal_tofile(im, "Tests/images/flower2.jpg")
867+
assert_image_similar_tofile(im, "Tests/images/flower2.jpg", 0.01)
868868

869869
def test_tiled_cmyk_jpeg(self):
870870
infile = "Tests/images/tiff_tiled_cmyk_jpeg.tif"
@@ -877,15 +877,15 @@ def test_tiled_cmyk_jpeg(self):
877877
def test_tiled_ycbcr_jpeg_1x1_sampling(self):
878878
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif"
879879
with Image.open(infile) as im:
880-
assert_image_equal_tofile(im, "Tests/images/flower2.jpg")
880+
assert_image_similar_tofile(im, "Tests/images/flower2.jpg", 0.01)
881881

882882
@mark_if_feature_version(
883883
pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
884884
)
885885
def test_tiled_ycbcr_jpeg_2x2_sampling(self):
886886
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif"
887887
with Image.open(infile) as im:
888-
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)
888+
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1.5)
889889

890890
def test_strip_planar_rgb(self):
891891
# gdal_translate -co TILED=no -co INTERLEAVE=BAND -co COMPRESS=LZW \

0 commit comments

Comments
 (0)