Skip to content

Commit

Permalink
Merge pull request #1149 from nztim/master
Browse files Browse the repository at this point in the history
Explicitly convert to integer
  • Loading branch information
olivervogel committed Apr 19, 2022
2 parents b89d394 + 67d8ab1 commit 7116728
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Intervention/Image/Gd/Commands/ResizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function execute($image)
protected function modify($image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h)
{
// create new image
$modified = imagecreatetruecolor($dst_w, $dst_h);
$modified = imagecreatetruecolor(intval($dst_w), intval($dst_h));

// get current image
$resource = $image->getCore();
Expand All @@ -70,8 +70,8 @@ protected function modify($image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h
$dst_y,
$src_x,
$src_y,
$dst_w,
$dst_h,
intval($dst_w),
intval($dst_h),
$src_w,
$src_h
);
Expand Down

0 comments on commit 7116728

Please sign in to comment.