Skip to content

Commit

Permalink
Save color correctly in background image
Browse files Browse the repository at this point in the history
  • Loading branch information
raumatbel committed Oct 31, 2017
1 parent d4ab99b commit c9786df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/code/Magento/Catalog/Model/ImageExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
*/
namespace Magento\Catalog\Model;

use Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter;
use Magento\Catalog\Helper\Image;
use Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter;
use Magento\Framework\View\Xsd\Media\TypeDataExtractorInterface;

class ImageExtractor implements \Magento\Framework\View\Xsd\Media\TypeDataExtractorInterface
class ImageExtractor implements TypeDataExtractorInterface
{
/**
* Extract configuration data of images from the DOM structure
Expand Down Expand Up @@ -55,6 +56,7 @@ private function processImageBackground($backgroundString)
$backgroundArray = [];
if (preg_match($pattern, $backgroundString, $backgroundArray)) {
array_shift($backgroundArray);
$backgroundArray = array_map('intval', $backgroundArray);
}
return $backgroundArray;
}
Expand Down

0 comments on commit c9786df

Please sign in to comment.