Skip to content
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

Save background color correctly in images. #11888

Merged
merged 3 commits into from
Nov 4, 2017

Conversation

raumatbel
Copy link
Contributor

@raumatbel raumatbel commented Oct 31, 2017

Description

If you updated the background color for image of product, this color always was black and it never was the color indicated in your configuration.

Fixed Issues (if relevant)

  1. magento/magento2#8799: Image brackground

Steps to reproduce

  1. Edit view.xml file
    ex: theme-frontend-luma/etc/view.xml
  2. Add background color attribute to an image
<image id="related_products_list" type="small_image">
     <width>152</width>
     <height>230</height>
     <background>[250,247,247]</background>
</image>
  1. Clear cache and reload images.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@ishakhsuvarov
Copy link
Contributor

Hi @raumatbel
Please consider covering this addition with the automated test.
Thanks

@ishakhsuvarov ishakhsuvarov self-assigned this Oct 31, 2017
@ishakhsuvarov ishakhsuvarov added this to the October 2017 milestone Oct 31, 2017
@ishakhsuvarov ishakhsuvarov added Release Line: 2.3 2.2.x bug report Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 31, 2017
@raumatbel
Copy link
Contributor Author

Hi @ishakhsuvarov there is already created a unit test for this in app/code/Magento/Catalog/Test/Unit/Model/ImageExtractorTest.php.

@okorshenko okorshenko modified the milestones: October 2017, November 2017 Nov 1, 2017
@ishakhsuvarov
Copy link
Contributor

@raumatbel I assume it may be improved, as it did not detect this problem.

@okorshenko okorshenko merged commit 761bd24 into magento:2.3-develop Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Progress: accept Release Line: 2.3 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants