Skip to content

Commit c3c786d

Browse files
committed
Releasing 1.1.17
2 parents 05428bf + cf9d69b commit c3c786d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TgUtils/ImageUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ public static function cropAndScale($imagePath, $variation, $newHeight, $newWidt
201201
$height = $image->getImageHeight();
202202
$actions = self::computeCropAndScale($width, $height, $newWidth, $newHeight, $options);
203203
if ($actions->scale != 1) {
204-
$image->scaleImage($actions->factor * $width, $actions->factor * $height);
204+
$image->scaleImage($actions->factor * $width, $actions->factor * $height, FALSE);
205+
$image->setImagePage(0,0,0,0); // This does some trick caused by scaling (canvas issue)
205206
}
206207
if ($image->cropImage($actions->width, $actions->height, $actions->x, $actions->y)) {
207208
// Writing it
@@ -261,7 +262,6 @@ public static function computeCropAndScale($origWidth, $origHeight, $maxWidth, $
261262
$rc->options = $options;
262263

263264
if ($rc->height < $maxHeight) {
264-
\TgLog\Log::error('path1');
265265
// scale up and crop along X axis
266266
$rc->factor = $maxHeight / $origHeight;
267267
$rc->width = $rc->factor * $origWidth;

0 commit comments

Comments
 (0)