Skip to content

Package for overlay watermark image to another image file

License

Notifications You must be signed in to change notification settings

GeCorpApps/php-watermark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-watermark

Package for overlay watermark image to another image file Package is in development mode, you can just test it now, call it with command:
composer require ge-corp/php-watermark:dev-main
Example:

use gecorp\phpwatermark\Options;
use gecorp\phpwatermark\watermark;

$options = [
    "margin" => [ // "margin" => ["left", "right", "top","bottom", "all"]
        "left" => 10, 
        "top" => 10
    ], "position" => Options::RIGHT_BOTTOM, 
    "quality" => 100
];
$watermark = new watermark(new Options($options));
$pOriginalFilename = "originalimage.jpg"; // filename with directory path of original image
$pWatermarkFileName = "watermarkimage.png"; // filename with directory of watermark image
$pNewFileName = "newfilename.jpg"; // new filename with directory path
$result = $watermark->makeImage($pOriginalFilename, $pWatermarkFileName, $pNewFileName);
if($result){
    echo "Done";
}else{
    echo $result; // Exception message
}

About

Package for overlay watermark image to another image file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages