diff --git a/demo/_synctiles.py b/demo/_synctiles.py index a5b9997..e6aeea8 100755 --- a/demo/_synctiles.py +++ b/demo/_synctiles.py @@ -59,12 +59,12 @@ TILE_SIZE = 510 OVERLAP = 1 LIMIT_BOUNDS = True -RENDERING_INTENT = ImageCms.Intent.ABSOLUTE_COLORIMETRIC GROUP_NAME_MAP = { 'Generic-TIFF': 'Generic TIFF', 'Hamamatsu': 'Hamamatsu NDPI', 'Hamamatsu-vms': 'Hamamatsu VMS', 'Mirax': 'MIRAX', + 'Philips-TIFF': 'Philips TIFF', } BUCKET_STATIC = { 'robots.txt': { @@ -102,8 +102,9 @@ def get_transform(image): """Return a function that transforms an image to sRGB in place.""" if image.color_profile is None: return lambda img: None + intent = ImageCms.getDefaultIntent(image.color_profile) transform = ImageCms.buildTransform( - image.color_profile, SRGB_PROFILE, 'RGB', 'RGB', RENDERING_INTENT, 0 + image.color_profile, SRGB_PROFILE, 'RGB', 'RGB', intent, 0 ) def xfrm(img): ImageCms.applyTransform(img, transform, True)