| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…or_has_transparency() functions into single function Updated tests and improved the images Introduced two new functions dominant_color_get_dominant_color() and dominant_color_has_transparency() that fetchs the date from image meta
…or_has_transparency() functions into single function Updated tests and improved the images Introduced two new functions dominant_color_get_dominant_color() and dominant_color_has_transparency() that fetchs the date from image meta
…or_has_transparency() functions into single function Updated tests and improved the images Introduced two new functions dominant_color_get_dominant_color() and dominant_color_has_transparency() that fetchs the date from image meta
| return new WP_Error( 'image_editor_dominant_color_error', __( 'Dominant color detection failed.', 'performance-lab' ) ); | ||
| } | ||
| return $hex; | ||
| return dechex( imagecolorat( $shorted_image, 0, 0 ) ); |
There was a problem hiding this comment.
Can you explain this change a little more.
Sorry, something went wrong.
There was a problem hiding this comment.
we are getting color with the shorten form #fff back from the underlining PHP code
Sorry, something went wrong.
There was a problem hiding this comment.
I think it better to always return a 6 character hex here.
Sorry, something went wrong.
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
There was a problem hiding this comment.
@pbearne I think the changes related to the issue look good for the most part, but this PR includes a bunch of additional changes which I think are out of scope as they do not relate to the underlying issue.
I think the only changes that are needed here are those in the load.php file (plus related tests). What is the reasoning for modifying the implementation of the image classes here? That seems out of scope.
Sorry, something went wrong.
…ing_up_image_editor
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>
|
|
||
| if ( strlen( $hex ) < 6 ) { | ||
| $rgb = imagecolorat( $shorted_image, 0, 0 ); | ||
| $r = ( $rgb >> 16 ) & 0xFF; |
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
I pushed up some changed to add some more unit test coverage.
Sorry, something went wrong.
There was a problem hiding this comment.
@pbearne Pretty much LGTM now. The remaining comments are minor, would be great if you could address them.
Sorry, something went wrong.
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
There was a problem hiding this comment.
@spacedmonkey Thanks for the quick iteration. LGTM! 🎉
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
…or_has_transparency() functions into single function
Updated tests and improved the images
Introduced two new functions dominant_color_get_dominant_color() and dominant_color_has_transparency() that fetchs the date from image meta
Summary
Fixes #
Relevant technical choices
Checklist