PHP code example of jxlwqq / watermark

1. Go to this page and download the library: Download jxlwqq/watermark library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jxlwqq / watermark example snippets


'extensions' => [
    'watermark' => [
        'enable' => true,
        'config' => [
            'content' => 'username', // Admin::user()->username, or Admin::user()->name or fixed value like 'internal info'
            'width' => '100px',
            'height' => '120px',
            'textAlign' => 'left',
            'textBaseline' => 'alphabetic',
            'font' => '15px Times New Roman',
            'fillStyle' => 'rgba(204,204,204,0.4)',
            'rotate' => 30,
            'zIndex' => 1000,
        ]
    ]
]