tests: vendor sRGB.icc instead of relying on distro-specific paths
This commit is contained in:
parent
dfcaa52bec
commit
4166367318
3 changed files with 5 additions and 3 deletions
|
@ -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),
|
||||
|
|
BIN
src/tests/data/sRGB.icc
Normal file
BIN
src/tests/data/sRGB.icc
Normal file
Binary file not shown.
Loading…
Reference in a new issue