Open Philosoft opened 7 years ago
here is my proposal:
<?php namespace app\modules\image\actions\helpers; use app\modules\image\models\ThumbnailWatermark; class ImageHelper { public static function mergeWithWatermark($imageSrc, $watermarkSrc, $watermarkPosition) { return "/files/" . ThumbnailWatermark::createWatermark( (object)["thumb_path" => $imageSrc], (object)[ "watermark_path" => $watermarkSrc, "position" => $watermarkPosition ] ); } }
$imageSrc and $watermarkSrc must be path relative to @webroot/files/
$imageSrc
$watermarkSrc
@webroot/files/
Additional ideas:
watermark_id
@fps01 @bethrezen this is a review request
here is my proposal:
$imageSrc
and$watermarkSrc
must be path relative to@webroot/files/
Additional ideas:
watermark_id
(instead of$watermarkSrc
) support@fps01 @bethrezen this is a review request