是否可以在使用PHP存储的AWS S3 Bucket上应用水印?
我已经尝试了以下检索图像是否存在,水印应用后。
$galleryImg = '_1473241284.jpg';
// echo $galleryImg;
test(file_exists('https://s3-ap-southeast-1.amazonaws.com/bucketname/test123/'.$galleryImg));
//for direct apply watermark on server
if(file_exists('https://s3-ap-southeast-1.amazonaws.com/bucketname/test123/'.$galleryImg)){
// test("hiii");
// echo "hii";
$watermark->apply('https://s3-ap-southeast-1.amazonaws.com/bucketname/test123/'.$galleryImg, 'https://s3-ap-southeast-1.amazonaws.com/bucketname/test123/'.$galleryImg, $watermarkImg, 3);
$response1 = $client->putObject(array('Bucket' => BUCKETNAME, 'Key' => 'bucketname/test123/'.$galleryImg, 'SourceFile' => 'https://s3-ap-southeast-1.amazonaws.com/bucketname/test123/'.$galleryImg, 'ACL' => 'public-read'));
//echo "watermark applied";
}
与其应用水印并将图像保存回Amazon S3,不如使用第三方服务动态应用水印:
- 带有imgix的水印
- 带云水印