Force the new geometry in the ImageMagick crop() function.

Fixes http://dev.kohanaframework.org/issues/3384
This commit is contained in:
Bharat Mediratta
2010-11-07 15:38:45 -08:00
parent d503513eca
commit c1bc59fbb5

View File

@@ -133,7 +133,7 @@ class Image_ImageMagick_Driver extends Image_Driver {
// Set the IM geometry based on the properties
$geometry = escapeshellarg($prop['width'].'x'.$prop['height'].'+'.$prop['left'].'+'.$prop['top']);
if ($error = exec(escapeshellcmd($this->dir.'convert'.$this->ext).' -background '.$this->background.' -flatten -crop '.$geometry.' '.$this->cmd_image.' '.$this->cmd_image))
if ($error = exec(escapeshellcmd($this->dir.'convert'.$this->ext).' -background '.$this->background.' -flatten -crop '.$geometry.'! '.$this->cmd_image.' '.$this->cmd_image))
{
$this->errors[] = $error;
return FALSE;