From fa378686378fb5d53cf8f17080211795a3ef9b12 Mon Sep 17 00:00:00 2001 From: Ghostie Date: Tue, 20 Aug 2024 19:58:25 -0500 Subject: [PATCH] adding intervention --- composer.json | 2 + composer.lock | 219 +++++++++++++++++++++++++++++++++++++++++++- config/image.php | 42 +++++++++ resources/js/app.js | 4 + 4 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 config/image.php diff --git a/composer.json b/composer.json index 4b7e183..645ec03 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,8 @@ "license": "MIT", "require": { "php": "^8.2", + "intervention/image": "^3.8", + "intervention/image-laravel": "^1.3", "laravel/framework": "^11.9", "laravel/tinker": "^2.9" }, diff --git a/composer.lock b/composer.lock index b8d9c77..6ba6db2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7e8c3c14ff33b199b4a0838993eb8423", + "content-hash": "f9cbbdceee9c9b2ba7cdec7381501a9d", "packages": [ { "name": "brick/math", @@ -1050,6 +1050,223 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "intervention/gif", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/Intervention/gif.git", + "reference": "3a2b5f8a8856e8877cdab5c47e51aab2d4cb23a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/gif/zipball/3a2b5f8a8856e8877cdab5c47e51aab2d4cb23a3", + "reference": "3a2b5f8a8856e8877cdab5c47e51aab2d4cb23a3", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpunit/phpunit": "^10.0", + "slevomat/coding-standard": "~8.0", + "squizlabs/php_codesniffer": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Intervention\\Gif\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@intervention.io", + "homepage": "https://intervention.io/" + } + ], + "description": "Native PHP GIF Encoder/Decoder", + "homepage": "https://github.com/intervention/gif", + "keywords": [ + "animation", + "gd", + "gif", + "image" + ], + "support": { + "issues": "https://github.com/Intervention/gif/issues", + "source": "https://github.com/Intervention/gif/tree/4.1.0" + }, + "funding": [ + { + "url": "https://paypal.me/interventionio", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2024-03-26T17:23:47+00:00" + }, + { + "name": "intervention/image", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image.git", + "reference": "1786ad5e1789050939d73cd195de4b8eaeeb34ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image/zipball/1786ad5e1789050939d73cd195de4b8eaeeb34ed", + "reference": "1786ad5e1789050939d73cd195de4b8eaeeb34ed", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "intervention/gif": "^4.1", + "php": "^8.1" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "phpstan/phpstan": "^1", + "phpunit/phpunit": "^10.0", + "slevomat/coding-standard": "~8.0", + "squizlabs/php_codesniffer": "^3.8" + }, + "suggest": { + "ext-exif": "Recommended to be able to read EXIF data properly." + }, + "type": "library", + "autoload": { + "psr-4": { + "Intervention\\Image\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@intervention.io", + "homepage": "https://intervention.io/" + } + ], + "description": "PHP image manipulation", + "homepage": "https://image.intervention.io/", + "keywords": [ + "gd", + "image", + "imagick", + "resize", + "thumbnail", + "watermark" + ], + "support": { + "issues": "https://github.com/Intervention/image/issues", + "source": "https://github.com/Intervention/image/tree/3.8.0" + }, + "funding": [ + { + "url": "https://paypal.me/interventionio", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + }, + { + "url": "https://ko-fi.com/interventionphp", + "type": "ko_fi" + } + ], + "time": "2024-08-16T14:57:26+00:00" + }, + { + "name": "intervention/image-laravel", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image-laravel.git", + "reference": "24738a017d42a6fa8d9adabdbd69a2c19c5b0d30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image-laravel/zipball/24738a017d42a6fa8d9adabdbd69a2c19c5b0d30", + "reference": "24738a017d42a6fa8d9adabdbd69a2c19c5b0d30", + "shasum": "" + }, + "require": { + "illuminate/support": "^8|^9|^10|^11", + "intervention/image": "^3.7", + "php": "^8.1" + }, + "require-dev": { + "orchestra/testbench": "^8.18", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Intervention\\Image\\Laravel\\ServiceProvider" + ], + "aliases": { + "Image": "Intervention\\Image\\Laravel\\Facades\\Image" + } + } + }, + "autoload": { + "psr-4": { + "Intervention\\Image\\Laravel\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@intervention.io", + "homepage": "https://intervention.io/" + } + ], + "description": "Laravel Integration of Intervention Image", + "homepage": "https://image.intervention.io/", + "keywords": [ + "gd", + "image", + "imagick", + "laravel", + "resize", + "thumbnail", + "watermark" + ], + "support": { + "issues": "https://github.com/Intervention/image-laravel/issues", + "source": "https://github.com/Intervention/image-laravel/tree/1.3.0" + }, + "funding": [ + { + "url": "https://paypal.me/interventionio", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2024-06-15T08:20:20+00:00" + }, { "name": "laravel/framework", "version": "v11.20.0", diff --git a/config/image.php b/config/image.php new file mode 100644 index 0000000..503ec76 --- /dev/null +++ b/config/image.php @@ -0,0 +1,42 @@ + \Intervention\Image\Drivers\Gd\Driver::class, + + /* + |-------------------------------------------------------------------------- + | Configuration Options + |-------------------------------------------------------------------------- + | + | These options control the behavior of Intervention Image. + | + | - "autoOrientation" controls whether an imported image should be + | automatically rotated according to any existing Exif data. + | + | - "decodeAnimation" decides whether a possibly animated image is + | decoded as such or whether the animation is discarded. + | + | - "blendingColor" Defines the default blending color. + */ + + 'options' => [ + 'autoOrientation' => true, + 'decodeAnimation' => true, + 'blendingColor' => 'ffffff', + ] +]; diff --git a/resources/js/app.js b/resources/js/app.js index 6840ad7..6b5e0ce 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -9,3 +9,7 @@ const dropzone = new Dropzone("#dropzone", { maxFiles: 1, uploadMultiple: false, }); + +dropzone.on("sending", function (file, xhr, formData) {}); + +dropzone.on("success", function (file, response) {});