Skip to content

Commit 0da55f1

Browse files
committed
ACP2E-1632: GIF Images issue on product page
1 parent 1e659fe commit 0da55f1

File tree

1 file changed

+2
-1
lines changed
  • lib/internal/Magento/Framework/Image/Adapter

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ private function applyTransparency(&$imageResourceTo, $transparentIndex): void
348348
$colorsForIndex = imagecolorsforindex($this->_imageHandler, $transparentIndex);
349349
list($red, $green, $blue) = array_values($colorsForIndex);
350350
$transparentColor = imagecolorallocate($imageResourceTo, (int) $red, (int) $green, (int) $blue);
351+
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
351352
} catch (\ValueError $e) {
352353
}
353354
}
@@ -391,7 +392,7 @@ private function _getTransparency($imageResource, $fileType, &$isAlpha = false,
391392
if (IMAGETYPE_GIF === $fileType || IMAGETYPE_PNG === $fileType) {
392393
// check for specific transparent color
393394
$transparentIndex = imagecolortransparent($imageResource);
394-
if ($transparentIndex >= 0 and $transparentIndex < imagecolorstotal($imageResource)) {
395+
if ($transparentIndex >= 0 && $transparentIndex < imagecolorstotal($imageResource)) {
395396
return $transparentIndex;
396397
} elseif (IMAGETYPE_PNG === $fileType) {
397398
// assume that truecolor PNG has transparency

0 commit comments

Comments
 (0)