Skip to content

Commit ce18fd2

Browse files
committed
Revert "Casting values to in after round() method which returns float"
This reverts commit c37fbef.
1 parent de55247 commit ce18fd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ protected function _adaptResizeValues($frameWidth, $frameHeight)
555555

556556
// define position in center
557557
// TODO: add positions option
558-
$dstY = (int) round(($frameHeight - $dstHeight) / 2);
559-
$dstX = (int) round(($frameWidth - $dstWidth) / 2);
558+
$dstY = round(($frameHeight - $dstHeight) / 2);
559+
$dstX = round(($frameWidth - $dstWidth) / 2);
560560

561561
// get rid of frame (fallback to zero position coordinates)
562562
if (!$this->_keepFrame) {
@@ -595,9 +595,9 @@ protected function _checkAspectRatio($frameWidth, $frameHeight)
595595
}
596596
// keep aspect ratio
597597
if ($this->_imageSrcWidth / $this->_imageSrcHeight >= $frameWidth / $frameHeight) {
598-
$dstHeight = (int) round($dstWidth / $this->_imageSrcWidth * $this->_imageSrcHeight);
598+
$dstHeight = round($dstWidth / $this->_imageSrcWidth * $this->_imageSrcHeight);
599599
} else {
600-
$dstWidth = (int) round($dstHeight / $this->_imageSrcHeight * $this->_imageSrcWidth);
600+
$dstWidth = round($dstHeight / $this->_imageSrcHeight * $this->_imageSrcWidth);
601601
}
602602
}
603603
return [$dstWidth, $dstHeight];

0 commit comments

Comments
 (0)