Skip to content

Commit

Permalink
Update tileset compose colorspace handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ralreegorganon committed Feb 7, 2020
1 parent 40c494c commit c398d45
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 c398d45

Please sign in to comment.