summaryrefslogtreecommitdiff
path: root/system/libraries/drivers/Image/GraphicsMagick.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-26 11:24:50 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-26 11:24:50 -0800
commit3060a6f662da66008d57a461bf1c9b5b4aa2b002 (patch)
tree442fd290505817efc0324f2af6e01805cb7396aa /system/libraries/drivers/Image/GraphicsMagick.php
parent1cd6a615bb47a33794e4a4f690c87a348ab752d7 (diff)
parent32d25dafd5b033338b6a9bb8c7c53edab462543a (diff)
Merge branch 'master' into talmdal_dev
Conflicts: modules/gallery/controllers/albums.php modules/gallery/controllers/movies.php modules/gallery/controllers/photos.php
Diffstat (limited to 'system/libraries/drivers/Image/GraphicsMagick.php')
-rw-r--r--system/libraries/drivers/Image/GraphicsMagick.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/system/libraries/drivers/Image/GraphicsMagick.php b/system/libraries/drivers/Image/GraphicsMagick.php
index a8bc4d9b..89b40b41 100644
--- a/system/libraries/drivers/Image/GraphicsMagick.php
+++ b/system/libraries/drivers/Image/GraphicsMagick.php
@@ -4,8 +4,8 @@
*
* @package Image
* @author Kohana Team
- * @copyright (c) 2007-2008 Kohana Team
- * @license http://kohanaphp.com/license.html
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
*/
class Image_GraphicsMagick_Driver extends Image_Driver {
@@ -31,7 +31,7 @@ class Image_GraphicsMagick_Driver extends Image_Driver {
{
// Attempt to locate GM by using "which" (only works for *nix!)
if ( ! is_file($path = exec('which gm')))
- throw new Kohana_Exception('image.graphicsmagick.not_found');
+ throw new Kohana_Exception('The GraphicsMagick directory specified does not contain a required program.');
$config['directory'] = dirname($path);
}
@@ -41,7 +41,7 @@ class Image_GraphicsMagick_Driver extends Image_Driver {
// Check to make sure the provided path is correct
if ( ! is_file(realpath($config['directory']).'/gm'.$this->ext))
- throw new Kohana_Exception('image.graphicsmagick.not_found', 'gm'.$this->ext);
+ throw new Kohana_Exception('The GraphicsMagick directory specified does not contain a required program, :gm:.', array(':gm:' => 'gm'.$this->ext));
// Set the installation directory
@@ -52,8 +52,12 @@ class Image_GraphicsMagick_Driver extends Image_Driver {
* Creates a temporary image and executes the given actions. By creating a
* temporary copy of the image before manipulating it, this process is atomic.
*/
- public function process($image, $actions, $dir, $file, $render = FALSE)
+ public function process($image, $actions, $dir, $file, $render = FALSE, $background = NULL)
{
+ // Need to implement $background support
+ if ($background !== NULL)
+ throw new Kohana_Exception('The GraphicsMagick driver does not support setting a background color');
+
// We only need the filename
$image = $image['file'];