-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added in_place argument to ImageOps.exif_transpose() #7092
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yantaozhao
reviewed
Apr 15, 2023
Exif tag 0x0112 is |
Ok, I've pushed a commit for that. |
yantaozhao
reviewed
Apr 16, 2023
yantaozhao
approved these changes
Apr 17, 2023
hugovk
reviewed
Jun 13, 2023
hugovk
reviewed
Jun 13, 2023
yantaozhao
approved these changes
Jun 14, 2023
hugovk
changed the title
Added inPlace argument to ImageOps.exif_transpose()
Added in_place argument to ImageOps.exif_transpose()
Jun 14, 2023
hugovk
approved these changes
Jun 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #7086
If there is no transposition required,
ImageOps.exif_transpose()
performs acopy()
operation. This is to provide consistency with when there is transposition required andtranspose()
is called, so that whether or not there is a change made, a new image instance is returned.#7086 (and effectively #5574 as well) dislike the performance cost of the
copy()
operation.This PR introduces a new argument,
inPlace
, copying the API ofImageCms.applyTransform()
. It isFalse
by default, to continue to provide the existing behaviour. If it isTrue
, then the provided image instance is modified, and nothing is returned. This means thatcopy()
does not have to be called, as no changes need to be made to the provided image.