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.
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
Use ImagingCore.ptr instead of ImagingCore.id #8341
Use ImagingCore.ptr instead of ImagingCore.id #8341
Changes from 25 commits
2303c06
a9798e7
2fcab26
f246be7
7435a06
c69ad03
920c4ac
147f75e
bf11639
8833548
8dcf229
6f9128b
fe002a7
56bc6a1
f916b5d
7f48567
5428e35
cb3a4e6
ee65b30
882ac78
934ae12
d29fa73
4318834
bd14915
a2988da
6921f83
1f3fe6f
3b09f43
d8ef314
bc97369
af521a1
aa22b24
5d430ea
9f409e8
87414b3
11bcd5a
b9d1768
8e332eb
a227f22
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this change was just because you didn't like
image.new_block(self.__mode, im.size)
?Rather than moving
new_block
in C, wouldn't it have been better for the C method to access the size on the image object instead of being passed it? Then this call could becomeimage.new_block(self.__mode)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d like to clarify that the reason for this change is not a matter of personal preference. The
new_block
method doesn't pertain to an existing image but instead creates a new block based on the passed parameters. As such, it makes more sense for it to reside in theImage.core
module rather than being a method of the image object itself.There is no intent to modify or enhance the behavior; I was simply correcting the method's improper placement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, the last mention of this patch was removed in Pillow 4.1.0 by #2360
Check warning on line 19 in src/PIL/_typing.py
Codecov / codecov/patch
src/PIL/_typing.py#L19
Check warning on line 68 in src/Tk/tkImaging.c
Codecov / codecov/patch
src/Tk/tkImaging.c#L68
Check warning on line 72 in src/Tk/tkImaging.c
Codecov / codecov/patch
src/Tk/tkImaging.c#L72
Check warning on line 78 in src/Tk/tkImaging.c
Codecov / codecov/patch
src/Tk/tkImaging.c#L78
Check warning on line 82 in src/Tk/tkImaging.c
Codecov / codecov/patch
src/Tk/tkImaging.c#L82
Check warning on line 3712 in src/_imaging.c
Codecov / codecov/patch
src/_imaging.c#L3712
Check warning on line 3729 in src/_imaging.c
Codecov / codecov/patch
src/_imaging.c#L3729
Check warning on line 545 in src/_imagingcms.c
Codecov / codecov/patch
src/_imagingcms.c#L544-L545