Skip to content

Commit

Permalink
fix blur deprecated warnings when dividing on blur method
Browse files Browse the repository at this point in the history
  • Loading branch information
antonlukin committed Jul 14, 2024
1 parent 2c31ec7 commit 190fc12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "antonlukin/poster-editor",
"version": "5.15",
"version": "5.16",
"description": "Wrapper for PHP's GD Library for easy image manipulation",
"keywords": ["php", "image", "text", "gd"],
"homepage": "https://github.com/antonlukin/poster-editor",
Expand Down
6 changes: 3 additions & 3 deletions src/PosterEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @package PosterEditor
* @author Anton Lukin <anton@lukin.me>
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @version Release: 5.15
* @version Release: 5.16
* @link https://github.com/antonlukin/poster-editor
*/
class PosterEditor
Expand Down Expand Up @@ -654,11 +654,11 @@ public function blur()
$height = $this->height;

// Scale by 25% and apply Gaussian blur.
$this->resize($width / 4, $height / 4);
$this->resize(intval($width / 4), intval($height / 4));
imagefilter($this->resource, IMG_FILTER_GAUSSIAN_BLUR);

// Scale result by 200% and blur again.
$this->resize($width / 2, $height / 2);
$this->resize(intval($width / 2), intval($height / 2));
imagefilter($this->resource, IMG_FILTER_GAUSSIAN_BLUR);

// Scale result back to original size and blur one more time.
Expand Down

0 comments on commit 190fc12

Please sign in to comment.