From 18d07b631d340885315cef79f5099151596b9d3c Mon Sep 17 00:00:00 2001 From: Remi Date: Mon, 4 Nov 2013 18:00:38 +0100 Subject: [PATCH] add plugins to save() method --- src/PHPThumb/GD.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/PHPThumb/GD.php b/src/PHPThumb/GD.php index 350bf19..a03adcc 100644 --- a/src/PHPThumb/GD.php +++ b/src/PHPThumb/GD.php @@ -935,6 +935,14 @@ public function save($fileName, $format = null) } } + //Execute any plugins + if ($this->plugins) { + foreach ($this->plugins as $plugin) { + /* @var $plugin \PHPThumb\PluginInterface */ + $plugin->execute($this); + } + } + // When the interlace option equals true or false call imageinterlace else leave it to default if ($this->options['interlace'] === true) { imageinterlace($this->oldImage, 1);