tests: vendor sRGB.icc instead of relying on distro-specific paths

Louis Sautier 3 years ago
parent dfcaa52bec
commit 4166367318
Signed by: sbraz
GPG Key ID: A777716B30AE82E3

@ -13,7 +13,6 @@ matrix:
- netpbm
- ghostscript
- mupdf-tools
- icc-profiles-free
- name: "python 3.9 Windows"
os: windows
language: shell # 'language: python' is an error on Travis CI Windows

@ -20,6 +20,9 @@ import warnings
import json
import pathlib
SCRIPT_DIR = pathlib.Path(__file__).resolve().parent
ICC_PROFILE = SCRIPT_DIR / "tests" / "data" / "sRGB.icc"
HAVE_MUTOOL = True
try:
ver = subprocess.check_output(["mutool", "-v"], stderr=subprocess.STDOUT)
@ -304,7 +307,7 @@ def compare(im1, im2, exact, icc, cmyk):
else:
iccargs = []
if icc:
iccargs = ["-profile", "/usr/share/color/icc/sRGB.icc"]
iccargs = ["-profile", ICC_PROFILE]
psnr = subprocess.run(
["compare"]
+ iccargs
@ -424,7 +427,7 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
"PSNR",
"(",
"-profile",
"/usr/share/color/icc/ghostscript/srgb.icc",
ICC_PROFILE,
"-depth",
"8",
str(img),

Binary file not shown.
Loading…
Cancel
Save