From b9e1c1d6d5a962035ce74b3b8662fdee6c6bb253 Mon Sep 17 00:00:00 2001 From: Diego Quintale Date: Mon, 3 Jun 2019 11:14:46 -0300 Subject: [PATCH 01/11] Revert "Merge pull request #45 from Kryptonit3/patch-1" This reverts commit 146ba2710575c1f21f3b0eb1193af4ca19ac5f36, reversing changes made to a497ea3481b3bb98442b4af1c4dd93213179d3e9. --- composer.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/composer.json b/composer.json index 5ca1a91..3ef9599 100644 --- a/composer.json +++ b/composer.json @@ -40,15 +40,5 @@ "classmap": [ "tests/" ] - }, - "extra": { - "laravel": { - "providers": [ - "Folklore\\Image\\ImageServiceProvider" - ], - "aliases": { - "Image": "Folklore\\Image\\Facades\\Image" - } - } } } From e1fe9b8856d07d88d0156a05c4086ec25cae78ae Mon Sep 17 00:00:00 2001 From: Diego Quintale Date: Mon, 3 Jun 2019 11:16:36 -0300 Subject: [PATCH 02/11] Update composer.json --- .idea/laravel-image.iml | 11 +++ .idea/misc.xml | 6 ++ .idea/modules.xml | 8 ++ .idea/php.xml | 4 + .idea/vcs.xml | 6 ++ .idea/workspace.xml | 184 ++++++++++++++++++++++++++++++++++++++++ composer.json | 4 +- 7 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 .idea/laravel-image.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/laravel-image.iml b/.idea/laravel-image.iml new file mode 100644 index 0000000..1efa6f4 --- /dev/null +++ b/.idea/laravel-image.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..bbafa04 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..07f31c0 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..d38a398 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,184 @@ + + + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - 1559571322673 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From d99d9dbdf3b87723f72895e8f1f5786f7d8a2fd5 Mon Sep 17 00:00:00 2001 From: diego-betalabs Date: Tue, 29 Oct 2019 12:00:38 -0300 Subject: [PATCH 04/11] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1b460ca..07af531 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": ">=5.5.9", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0", "guzzlehttp/guzzle": "5.3|~6.0", "imagine/imagine": "0.6.*" }, From ed23fdf9c97cc297c6b1bd8a24b5ed3bbd8b40f9 Mon Sep 17 00:00:00 2001 From: diego-betalabs Date: Thu, 4 Jun 2020 18:44:37 -0300 Subject: [PATCH 05/11] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 07af531..808065b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": ">=5.5.9", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0", "guzzlehttp/guzzle": "5.3|~6.0", "imagine/imagine": "0.6.*" }, From 8c9a84489927f72e8a58b023f07b132e3e0a9f0d Mon Sep 17 00:00:00 2001 From: diego-betalabs Date: Mon, 9 Nov 2020 19:12:55 -0300 Subject: [PATCH 06/11] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 808065b..2046e7c 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ ], "require": { "php": ">=5.5.9", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0", - "guzzlehttp/guzzle": "5.3|~6.0", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0", + "guzzlehttp/guzzle": "5.3|~6.0|^7.0.1", "imagine/imagine": "0.6.*" }, "require-dev": { From d5c8335b407d804e9aa904fa488ce70b4a3a15a2 Mon Sep 17 00:00:00 2001 From: diego-betalabs Date: Tue, 24 Nov 2020 10:12:10 -0300 Subject: [PATCH 07/11] Update ImageManager.php --- src/Folklore/Image/ImageManager.php | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Folklore/Image/ImageManager.php b/src/Folklore/Image/ImageManager.php index 0a24638..ffd2cdf 100644 --- a/src/Folklore/Image/ImageManager.php +++ b/src/Folklore/Image/ImageManager.php @@ -59,8 +59,8 @@ public function url($src, $width = null, $height = null, $options = array()) $width = null; $height = null; } - - $config = $this->app['config']; + + $config = app()['config']; $url_parameter = isset($options['url_parameter']) ? $options['url_parameter']:$config['image.url_parameter']; $url_parameter_separator = isset($options['url_parameter_separator']) ? $options['url_parameter_separator']:$config['image.url_parameter_separator']; unset($options['url_parameter'],$options['url_parameter_separator']); @@ -109,13 +109,13 @@ public function url($src, $width = null, $height = null, $options = array()) // Break the path apart and put back together again $parts = pathinfo($src); - $host = isset($options['host']) ? $options['host']:$this->app['config']['image.host']; + $host = isset($options['host']) ? $options['host']:app()['config']['image.host']; $dir = trim($parts['dirname'], '/'); $path = array(); $path[] = rtrim($host, '/'); - if ($prefix = $this->app['config']->get('image.write_path')) { + if ($prefix = app()['config']->get('image.write_path')) { $path[] = trim($prefix, '/'); } @@ -144,7 +144,7 @@ public function url($src, $width = null, $height = null, $options = array()) public function make($path, $options = array()) { //Get app config - $config = $this->app['config']; + $config = app()['config']; // See if the referenced file exists and is an image if (!($path = $this->getRealPath($path))) { @@ -226,16 +226,16 @@ public function make($path, $options = array()) public function serve($path, $config = array()) { //Use user supplied quality or the config value - $quality = array_get($config, 'quality', $this->app['config']['image.quality']); + $quality = array_get($config, 'quality', app()['config']['image.quality']); //if nothing works fallback to the hardcoded value $quality = $quality ?: $this->defaultOptions['quality']; //Merge config with defaults $config = array_merge(array( 'quality' => $quality, - 'custom_filters_only' => $this->app['config']['image.serve_custom_filters_only'], - 'write_image' => $this->app['config']['image.write_image'], - 'write_path' => $this->app['config']['image.write_path'] + 'custom_filters_only' => app()['config']['image.serve_custom_filters_only'], + 'write_image' => app()['config']['image.write_image'], + 'write_path' => app()['config']['image.write_path'] ), $config); $serve = new ImageServe($this, $config); @@ -254,12 +254,12 @@ public function proxy($path, $config = array()) { //Merge config with defaults $config = array_merge(array( - 'tmp_path' => $this->app['config']['image.proxy_tmp_path'], - 'filesystem' => $this->app['config']['image.proxy_filesystem'], - 'cache' => $this->app['config']['image.proxy_cache'], - 'cache_expiration' => $this->app['config']['image.proxy_cache_expiration'], - 'write_image' => $this->app['config']['image.proxy_write_image'], - 'cache_filesystem' => $this->app['config']['image.proxy_cache_filesystem'] + 'tmp_path' => app()['config']['image.proxy_tmp_path'], + 'filesystem' => app()['config']['image.proxy_filesystem'], + 'cache' => app()['config']['image.proxy_cache'], + 'cache_expiration' => app()['config']['image.proxy_cache_expiration'], + 'write_image' => app()['config']['image.proxy_write_image'], + 'cache_filesystem' => app()['config']['image.proxy_cache_filesystem'] ), $config); $serve = new ImageProxy($this, $config); @@ -420,7 +420,7 @@ public function deleteManipulated($path) public function pattern($parameter = null, $pattern = null) { //Replace the {options} with the options regular expression - $config = $this->app['config']; + $config = app()['config']; $parameter = !isset($parameter) ? $config['image.url_parameter']:$parameter; $parameter = preg_replace('/\\\{\s*options\s*\\\}/', '([0-9a-zA-Z\(\),\-/._]+?)?', preg_quote($parameter)); @@ -446,7 +446,7 @@ public function parse($path, $config = array()) $config = array_merge(array( 'custom_filters_only' => false, 'url_parameter' => null, - 'url_parameter_separator' => $this->app['config']['image.url_parameter_separator'] + 'url_parameter_separator' => app()['config']['image.url_parameter_separator'] ), $config); $parsedOptions = array(); @@ -478,7 +478,7 @@ protected function parseOptions($option_path, $config = array()) //Default config $config = array_merge(array( 'custom_filters_only' => false, - 'url_parameter_separator' => $this->app['config']['image.url_parameter_separator'] + 'url_parameter_separator' => app()['config']['image.url_parameter_separator'] ), $config); $options = array(); @@ -562,9 +562,9 @@ public function getRealPath($path) } //Get directories - $dirs = $this->app['config']['image.src_dirs']; - if ($this->app['config']['image.write_path']) { - $dirs[] = $this->app['config']['image.write_path']; + $dirs = app()['config']['image.src_dirs']; + if (app()['config']['image.write_path']) { + $dirs[] = app()['config']['image.write_path']; } // Loop through all the directories files may be uploaded to @@ -614,8 +614,8 @@ protected function getFiles($path, $withOriginal = true) $parts = pathinfo($path); $dirs = [$parts['dirname']]; $dirs = [$parts['dirname']]; - if ($this->app['config']['image.write_path']) { - $dirs[] = $this->app['config']['image.write_path']; + if (app()['config']['image.write_path']) { + $dirs[] = app()['config']['image.write_path']; } foreach ($dirs as $directory) { $files = scandir($directory); @@ -837,7 +837,7 @@ protected function createGmagickDriver() */ public function getDefaultDriver() { - return $this->app['config']['image.driver']; + return app()['config']['image.driver']; } /** @@ -848,6 +848,6 @@ public function getDefaultDriver() */ public function setDefaultDriver($name) { - $this->app['config']['image.driver'] = $name; + app()['config']['image.driver'] = $name; } } From dfee7af30f36d8ebec721489ad059a4f0c252635 Mon Sep 17 00:00:00 2001 From: diego-betalabs Date: Fri, 8 Jul 2022 15:08:36 -0300 Subject: [PATCH 08/11] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2046e7c..b56ad9f 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": ">=5.5.9", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0|^9.0", "guzzlehttp/guzzle": "5.3|~6.0|^7.0.1", "imagine/imagine": "0.6.*" }, From 71975dd4476bd95109d8c501153cedc45c506c3f Mon Sep 17 00:00:00 2001 From: Ali Yar Khan <37889962+AliYar-Khan@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:14:16 +0500 Subject: [PATCH 09/11] package name updated --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b56ad9f..7c65fb6 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "betalabs/image", - "description": "Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation", + "name": "image/laravel-image-manipulation", + "description": "Image manipulation library for Laravel 9 based on Imagine and inspired by Croppa for easy url based manipulation", "keywords": ["laravel","image","imagick","gd","imagine","watermark","gmagick","thumbnail"], "homepage": "http://github.com/Folkloreatelier/laravel-image", "license": "MIT", From 61c5e4be5da5149718d81c47f2c912e8b9472bc9 Mon Sep 17 00:00:00 2001 From: Ali Yar Khan <37889962+AliYar-Khan@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:15:38 +0500 Subject: [PATCH 10/11] name update v2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7c65fb6..7090ce3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "image/laravel-image-manipulation", + "name": "AYK/laravel-image-manipulation", "description": "Image manipulation library for Laravel 9 based on Imagine and inspired by Croppa for easy url based manipulation", "keywords": ["laravel","image","imagick","gd","imagine","watermark","gmagick","thumbnail"], "homepage": "http://github.com/Folkloreatelier/laravel-image", From 39a5ede7ce997ebfcda8139b52d6eacb8f9a804b Mon Sep 17 00:00:00 2001 From: Ali Yar Khan <37889962+AliYar-Khan@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:16:38 +0500 Subject: [PATCH 11/11] name lower case --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7090ce3..95820fa 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "AYK/laravel-image-manipulation", + "name": "ayk/laravel-image-manipulation", "description": "Image manipulation library for Laravel 9 based on Imagine and inspired by Croppa for easy url based manipulation", "keywords": ["laravel","image","imagick","gd","imagine","watermark","gmagick","thumbnail"], "homepage": "http://github.com/Folkloreatelier/laravel-image",