Skip to content

Commit

Permalink
Merge pull request #6477 from radarhere/libtiff
Browse files Browse the repository at this point in the history
Increased test tolerance to allow for libtiff with libjpeg-turbo
  • Loading branch information
hugovk committed Aug 4, 2022
2 parents 7591395 + 101f115 commit 1b5abea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/test_file_libtiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,15 @@ def test_strip_cmyk_16l_jpeg(self):
def test_strip_ycbcr_jpeg_2x2_sampling(self):
infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif"
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1.2)

@mark_if_feature_version(
pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
)
def test_strip_ycbcr_jpeg_1x1_sampling(self):
infile = "Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif"
with Image.open(infile) as im:
assert_image_equal_tofile(im, "Tests/images/flower2.jpg")
assert_image_similar_tofile(im, "Tests/images/flower2.jpg", 0.01)

def test_tiled_cmyk_jpeg(self):
infile = "Tests/images/tiff_tiled_cmyk_jpeg.tif"
Expand All @@ -877,15 +877,15 @@ def test_tiled_cmyk_jpeg(self):
def test_tiled_ycbcr_jpeg_1x1_sampling(self):
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif"
with Image.open(infile) as im:
assert_image_equal_tofile(im, "Tests/images/flower2.jpg")
assert_image_similar_tofile(im, "Tests/images/flower2.jpg", 0.01)

@mark_if_feature_version(
pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
)
def test_tiled_ycbcr_jpeg_2x2_sampling(self):
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif"
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1.5)

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

0 comments on commit 1b5abea

Please sign in to comment.