From c398d45d9b6cb92159b46947cbe3cfbfa65701eb Mon Sep 17 00:00:00 2001 From: Jason Jones Date: Fri, 7 Feb 2020 13:06:47 -0900 Subject: [PATCH] Update tileset compose colorspace handling --- tools/gfx_tools/compose.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/gfx_tools/compose.py b/tools/gfx_tools/compose.py index 96015acff7a0c..d8f8a0fcceeac 100644 --- a/tools/gfx_tools/compose.py +++ b/tools/gfx_tools/compose.py @@ -239,6 +239,12 @@ def merge_row(self, refs): except Vips.Error: pass + try: + if vips_image.get_typeof("icc-profile-data") != 0: + vips_image = vips_image.icc_transform("srgb") + except Vips.Error: + pass + if vips_image.width != self.width or vips_image.height != self.height: size_msg = "{} is {}x{}, sheet sprites are {}x{}." print(size_msg.format(png_pathname, vips_image.width, vips_image.height,