Skip to content

Updated ImageCms.createProfile colorTemp default and docstring#8096

Merged
hugovk merged 2 commits intopython-pillow:mainfrom
radarhere:createprofile
Jun 2, 2024
Merged

Updated ImageCms.createProfile colorTemp default and docstring#8096
hugovk merged 2 commits intopython-pillow:mainfrom
radarhere:createprofile

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
@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.

2 participants