From ae5a7ec298c45e38887e77fd7eec095de69d6818 Mon Sep 17 00:00:00 2001 From: prabhat Date: Fri, 10 Feb 2017 16:18:06 +0530 Subject: [PATCH 1/2] add image optimization options --- CommandOptions.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CommandOptions.php b/CommandOptions.php index db44892..e0e3b73 100644 --- a/CommandOptions.php +++ b/CommandOptions.php @@ -149,4 +149,26 @@ public function strip() return $this; } + /** + * @param string $type + * @return $this + */ + public function interlace($type) + { + $this->command .= ' -interlace ' . $type; + + return $this; + } + + /** + * @param Float $radius + * @return $this + */ + public function gaussianBlur($radius) + { + $this->command .= ' -gaussian-blur ' . $radius; + + return $this; + } + } From 51d1c3ebccb34638579a48c27e10f644ac4ec151 Mon Sep 17 00:00:00 2001 From: prabhat Date: Fri, 10 Feb 2017 18:40:01 +0530 Subject: [PATCH 2/2] convert input to typeof float --- CommandOptions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommandOptions.php b/CommandOptions.php index e0e3b73..3fbe2e5 100644 --- a/CommandOptions.php +++ b/CommandOptions.php @@ -166,7 +166,7 @@ public function interlace($type) */ public function gaussianBlur($radius) { - $this->command .= ' -gaussian-blur ' . $radius; + $this->command .= ' -gaussian-blur ' . ((float)$radius); return $this; }