Skip to content

Commit

Permalink
Merge pull request #37818 from ralreegorganon/tileset-compose-colorsp…
Browse files Browse the repository at this point in the history
…ace-handling

Update tileset compose colorspace handling
  • Loading branch information
ZhilkinSerg authored Feb 8, 2020
2 parents 8e990f5 + c398d45 commit f7bc0e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/gfx_tools/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7bc0e6

Please sign in to comment.