Deprecate ICNS (width, height, scale) sizes in favour of load(scale) #8352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Normally, an image size is (width, height). However, the ICNS format allows a third dimension to be added to this, scale, that only exists before loading.
https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#icns
This is a brief exception to the rule that image sizes have two dimensions. As such, it complicates type hinting, not just in our implementation, but also conceptually for the user - it would be confusing to explain that images might have three dimensions, but only for one format and only briefly.
This PR suggests that we deprecate this third dimension, and instead take an idea from EPS.
https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#loading
So instead of
the user can now