-
Notifications
You must be signed in to change notification settings - Fork 130
Add Dominant Color module to provide color background for loading images #282
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
Conversation
created classes for image functions Updated tests NOT all tests are passsing
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
got get_has_transparency() working
…into INITS-199_domiant_color
enable_dominant_color_for_image
} | ||
|
||
try { | ||
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged |
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.
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged | |
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged |
Do we need this line anymore?
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.
+1, let's remove this line.
|
||
'red_png' => array( | ||
'image_path' => TESTS_PLUGIN_DIR . '/tests/testdata/modules/images/dominant-color/red.png', | ||
'expected_color' => array( 'ff0505', 'ff55', 'ff0506', 'ff56' ), |
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.
4 different options seems like a lot here. Why are so many different options? Why are there 4 digital hex values?
merge head
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.
@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 |
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.
+1, let's remove this line.
…r-gd.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-gd.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-imagick.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-imagick.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-gd.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-imagick.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-gd.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…r-imagick.php Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
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.
Awesome - thanks to everyone involved! 🎉
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]
orInfrastructure
label.[Type]
label.no milestone
label.