Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiki23 committed Dec 4, 2023
0 parents commit 9d80566
Show file tree
Hide file tree
Showing 12 changed files with 695 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
21 changes: 21 additions & 0 deletions LICENSE
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.
66 changes: 66 additions & 0 deletions README.md
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).
26 changes: 26 additions & 0 deletions composer.json
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
}
Loading

0 comments on commit 9d80566

Please sign in to comment.