Skip to content

Conversation

@Yay295
Copy link
Contributor

@Yay295 Yay295 commented Apr 1, 2024

The ImageCmsTransform mode properties are set here:

Pillow/src/PIL/ImageCms.py

Lines 317 to 319 in 6b676f2

# Note: inputMode and outputMode are for pyCMS compatibility only
self.input_mode = self.inputMode = input_mode
self.output_mode = self.outputMode = output_mode

Some documentation further down in that file used the wrong property names.

These values are also passed to the C code where they are used and then stored, but the stored values are not documented or used anywhere, so I've removed them.

@nulano
Copy link
Contributor

nulano commented Apr 1, 2024

the stored values are not documented or used anywhere

FWIW, there are type hints added in #7913:

@property
def inputMode(self) -> str: ...
@property
def outputMode(self) -> str: ...

@Yay295
Copy link
Contributor Author

Yay295 commented Apr 1, 2024

Ah, I didn't think to check there. And that did go in with 10.3.0 a few hours ago.

@hugovk hugovk changed the title Remove unused properties and fix documentation Remove unused CMS properties and fix documentation Apr 6, 2024
@hugovk hugovk merged commit f8ec9f7 into python-pillow:main Apr 6, 2024
@hugovk
Copy link
Member

hugovk commented Apr 6, 2024

Thank you!

@Yay295 Yay295 deleted the imagingcms_modes branch April 6, 2024 06:32
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.

4 participants