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

Updated ImageCms.createProfile colorTemp default and docstring #8096

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Jun 2, 2024

colorTemp is hinted as a float,

Pillow/src/PIL/ImageCms.py

Lines 756 to 758 in 4f4b0bc

def createProfile(
colorSpace: Literal["LAB", "XYZ", "sRGB"], colorTemp: SupportsFloat = -1
) -> core.CmsProfile:

but described in the docstring as an integer.
:param colorTemp: Positive integer for the white point for the profile, in

I've updated the docstring to say 'float' instead.

I've also changed the default from -1 to 0. This has no effect, it just seems simpler to me. It also matches the default in the C layer.

@hugovk hugovk merged commit eeb1eea into python-pillow:main Jun 2, 2024
56 checks passed
@radarhere radarhere deleted the createprofile branch June 2, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants