Add Dominant Color module to provide color background for loading images#282
Merged
felixarntz merged 245 commits intoWordPress:trunkfrom Jun 14, 2022
Merged
Add Dominant Color module to provide color background for loading images#282felixarntz merged 245 commits intoWordPress:trunkfrom
felixarntz merged 245 commits intoWordPress:trunkfrom
Conversation
created classes for image functions Updated tests NOT all tests are passsing
Co-authored-by: Jonny Harris <[email protected]>
Co-authored-by: Jonny Harris <[email protected]>
Co-authored-by: Jonny Harris <[email protected]>
Co-authored-by: Jonny Harris <[email protected]>
got get_has_transparency() working
…into INITS-199_domiant_color
enable_dominant_color_for_image
spacedmonkey
reviewed
Jun 9, 2022
| } | ||
|
|
||
| try { | ||
| // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged |
Member
There was a problem hiding this comment.
Suggested change
| // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged | |
| // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged |
Do we need this line anymore?
spacedmonkey
reviewed
Jun 9, 2022
|
|
||
| 'red_png' => array( | ||
| 'image_path' => TESTS_PLUGIN_DIR . '/tests/testdata/modules/images/dominant-color/red.png', | ||
| 'expected_color' => array( 'ff0505', 'ff55', 'ff0506', 'ff56' ), |
Member
There was a problem hiding this comment.
4 different options seems like a lot here. Why are so many different options? Why are there 4 digital hex values?
merge head
felixarntz
reviewed
Jun 14, 2022
Member
felixarntz
left a comment
There was a problem hiding this comment.
@pbearne @spacedmonkey Awesome work, LGTM!
My remaining comments are all super minor, mostly related to documentation. Please fix these, and this should be good to go.
modules/images/dominant-color/class-dominant-color-image-editor-gd.php
Outdated
Show resolved
Hide resolved
modules/images/dominant-color/class-dominant-color-image-editor-gd.php
Outdated
Show resolved
Hide resolved
modules/images/dominant-color/class-dominant-color-image-editor-imagick.php
Outdated
Show resolved
Hide resolved
modules/images/dominant-color/class-dominant-color-image-editor-imagick.php
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| try { | ||
| // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged |
…r-gd.php Co-authored-by: Felix Arntz <[email protected]>
…r-gd.php Co-authored-by: Felix Arntz <[email protected]>
…r-imagick.php Co-authored-by: Felix Arntz <[email protected]>
…r-imagick.php Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
This was referenced Jun 14, 2022
…r-gd.php Co-authored-by: Felix Arntz <[email protected]>
…r-imagick.php Co-authored-by: Felix Arntz <[email protected]>
…r-gd.php Co-authored-by: Felix Arntz <[email protected]>
…r-imagick.php Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
Co-authored-by: Felix Arntz <[email protected]>
felixarntz
approved these changes
Jun 14, 2022
Member
felixarntz
left a comment
There was a problem hiding this comment.
Awesome - thanks to everyone involved! 🎉
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.
Summary
This stores a dominant color of an image to image meta.
We then use this as a background color for images.
Checklist
fixes: #19
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.