Support streams from imagick image editor#521
Closed
p00ya wants to merge 6 commits intoWordPress:masterfrom
Closed
Support streams from imagick image editor#521p00ya wants to merge 6 commits intoWordPress:masterfrom
p00ya wants to merge 6 commits intoWordPress:masterfrom
Conversation
f0d8ca1 to
c950999
Compare
Some streams do not support "stat()", but will still allow reading and writing.
This separates the logic for writing to streams from "_save" into _write_image. It forces the call through "make_image" to match the existing pattern. "make_image" itself is overidden to unconditionally invoke its callback. In terms of compatibility, in the unlikely case that anyone is relying on WP_Image_Editor_Imagick::make_image, it will work just the same for plain files. Stream support is new behaviour, so a caller will just have to ensure their callback handles URLs appropriately.
Overriding make_image will likely make it incompatible with existing callers. Don't use it.
Contributor
|
Merged into WP Core in https://core.trac.wordpress.org/changeset/49230 |
This file contains hidden or 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
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.
Support streams from the imagick image editor. Fixes problems with using
realpathandimagick::readImagewith streams.Trac ticket: https://core.trac.wordpress.org/ticket/42663
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.