Skip to content

Commit

Permalink
Image_GD::sharpen() fails because imageconvolution() does not return …
Browse files Browse the repository at this point in the history
…a resource. Fixes #1986
  • Loading branch information
Woody Gilk committed Sep 15, 2009
1 parent ce20906 commit 0017143
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions classes/kohana/image/gd.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,11 @@ protected function _do_sharpen($amount)
);

// Perform the sharpen
if ($image = imageconvolution($this->_image, $matrix, $amount - 8, 0))
if (imageconvolution($this->_image, $matrix, $amount - 8, 0))
{
// Swap the new image for the old one
imagedestroy($this->_image);
$this->_image = $image;

// Reset the width and height
$this->width = imagesx($image);
$this->height = imagesy($image);
$this->width = imagesx($this->_image);
$this->height = imagesy($this->_image);
}
}

Expand Down

0 comments on commit 0017143

Please sign in to comment.