Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tileset compose colorspace handling #37818

Conversation

ralreegorganon
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

libvips, used by the tileset compose script, assumes that all files are in the same colorspace. When they're not, it causes issues when they're all composed together.

Describe the solution

Check for an ICC profile, and if it's there, use it to transform the image into sRGB colorspace that libvips assumes images are in.

Describe alternatives you've considered

We could have the script check for this and just complain instead of fix it, but we've generally tried to make it more accepting if it can handle the issue (much as was done for the requirement to have an alpha channel). We can always have it complain in the future.

Testing

Ran the compose both before and after and noted that the sprites missing colors in the before had it in the after.

before

after

@ifreund ifreund added the [Python] Code made in Python label Feb 7, 2020
@ZhilkinSerg ZhilkinSerg added the SDL: Tiles / Sound Tiles visual interface and sounds. label Feb 8, 2020
@ZhilkinSerg ZhilkinSerg merged commit f7bc0e6 into CleverRaven:master Feb 8, 2020
@ralreegorganon ralreegorganon deleted the tileset-compose-colorspace-handling branch April 7, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Python] Code made in Python SDL: Tiles / Sound Tiles visual interface and sounds.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants