-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9d80566
Showing
12 changed files
with
695 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Rafiki23 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
# WatermarkCredits | ||
|
||
WatermarkCredits is a Laravel package for easily applying watermarks with names/logos and author information on images. | ||
|
||
## Installation | ||
|
||
Install the package via composer: | ||
|
||
```bash | ||
composer require rafiki23/watermarkcredits | ||
``` | ||
|
||
Add the service provider to your `config/app.php` file: | ||
|
||
```php | ||
'providers' => [ | ||
// Other Service Providers | ||
|
||
Rafiki23\WatermarkCredits\WatermarkServiceProvider::class, | ||
], | ||
``` | ||
|
||
Publish the configuration file: | ||
|
||
```bash | ||
php artisan vendor:publish --provider="Rafiki23\WatermarkCredits\WatermarkServiceProvider" --tag="config" | ||
``` | ||
|
||
## Configuration | ||
|
||
After publishing the configuration file, it is located at `config/watermark.php`. You can modify it to set your default configurations. | ||
|
||
```php | ||
return [ | ||
'opacity' => 0.6, | ||
'text_color' => '#ffffff', | ||
'font_size' => 24, | ||
'default_logo_path' => 'path/to/your/logo.png', | ||
'logo_text' => 'Default Logo Text', | ||
// other configurations... | ||
]; | ||
``` | ||
|
||
## Usage | ||
|
||
Here's how you can use the WatermarkCredits package: | ||
|
||
```php | ||
use Rafiki23\WatermarkCredits\Watermark; | ||
|
||
$watermark = new Watermark(); | ||
|
||
// Apply watermark to an image | ||
$watermark->applyWatermark('path/to/image.jpg', 'Your Watermark Text')->save('path/to/output/image.jpg'); | ||
``` | ||
|
||
You can also specify a custom logo: | ||
|
||
```php | ||
$watermark->applyWatermark('path/to/image.jpg', 'Your Watermark Text', 'path/to/your/custom/logo.png')->save('path/to/output/image.jpg'); | ||
``` | ||
|
||
## License | ||
|
||
The WatermarkCredits package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "rafiki23/watermarkcredits", | ||
"description": "WatermarkCredits is a Laravel package that enables the easy application of watermarks with names/logos and author information onto images. It provides a straightforward interface for applying custom watermarks with adjustable opacity levels and the option to add supplemental text. This is perfect for photographers, content creators, and businesses looking to protect their work and ensure proper authorship attribution on their images.", | ||
"type": "library", | ||
"version": "0.0.1", | ||
"require": { | ||
"intervention/image": "^2.5", | ||
"php": "^7.4 || ^8.0 || ^8.1", | ||
"laravel/framework": "^9.0|^10.0", | ||
"ext-gd": "*" | ||
}, | ||
"license": "MIT", | ||
"autoload": { | ||
"psr-4": { | ||
"Rafiki23\\WatermarkCredits\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "rafiki23", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Oops, something went wrong.