Skip to content

Commit 16962dd

Browse files
author
Timon de Groot
committed
Fix BIC changes
1 parent 2cc29b7 commit 16962dd

File tree

2 files changed

+4
-49
lines changed

2 files changed

+4
-49
lines changed

lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ private function addSingleWatermark($positionX, int $positionY, \Imagick $waterm
589589
*
590590
* @return int
591591
*/
592-
public function getColorspace(): int
592+
private function getColorspace(): int
593593
{
594594
if ($this->colorspace === -1) {
595595
$this->colorspace = $this->_imageHandler->getImageColorspace();
@@ -599,16 +599,6 @@ public function getColorspace(): int
599599
return $this->colorspace;
600600
}
601601

602-
/**
603-
* Get the original image colorspace.
604-
*
605-
* @return int
606-
*/
607-
public function getOriginalColorspace(): int
608-
{
609-
return $this->originalColorspace;
610-
}
611-
612602
/**
613603
* Convert colorspace to SRGB if current colorspace
614604
* is COLORSPACE_CMYK or COLORSPACE_UNDEFINED.

lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public function testWatermark($imagePath, $expectedMessage)
7373
$this->imageMagic->watermark($imagePath);
7474
}
7575

76+
/**
77+
* @return array
78+
*/
7679
public function watermarkDataProvider(): array
7780
{
7881
return [
@@ -85,44 +88,6 @@ public function watermarkDataProvider(): array
8588
];
8689
}
8790

88-
/**
89-
* @param string $imagePath
90-
* @throws \Magento\Framework\Exception\LocalizedException
91-
* @dataProvider cmykDataProvider
92-
*/
93-
public function testCmyk(string $imagePath)
94-
{
95-
$this->imageMagic->open($imagePath);
96-
$this->assertEquals(\Imagick::COLORSPACE_CMYK, $this->imageMagic->getOriginalColorspace());
97-
$this->assertEquals(\Imagick::COLORSPACE_SRGB, $this->imageMagic->getColorspace());
98-
}
99-
100-
public function cmykDataProvider(): array
101-
{
102-
return [
103-
[__DIR__ . '/_files/cmyk_image.jpg']
104-
];
105-
}
106-
107-
/**
108-
* @param string $imagePath
109-
* @throws \Magento\Framework\Exception\LocalizedException
110-
* @dataProvider srgbDataProvider
111-
*/
112-
public function testSrgb(string $imagePath)
113-
{
114-
$this->imageMagic->open($imagePath);
115-
$this->assertEquals(\Imagick::COLORSPACE_SRGB, $this->imageMagic->getOriginalColorspace());
116-
$this->assertEquals(\Imagick::COLORSPACE_SRGB, $this->imageMagic->getColorspace());
117-
}
118-
119-
public function srgbDataProvider(): array
120-
{
121-
return [
122-
[__DIR__ . '/_files/srgb_image.jpg']
123-
];
124-
}
125-
12691
public function testSaveWithException()
12792
{
12893
$this->expectException('Exception');

0 commit comments

Comments
 (0)