my code uses the image of the target path as the watermark. How to change it to the user name of the uploader as the watermark? The user name tag is ["attach_name"]
if ($upload_data["is_image"] == 1)
{
foreach (AWS_APP::config()->get("image")->attachment_thumbnail AS $key => $val)
{
$thumb_file[$key] = $upload_data["file_path"] . $val["w"] . "x" . $val["h"] . "_" . basename($upload_data["full_path"]);
if(H::isAnimatedGif($upload_data["full_path"])==0){
$wwater_info = getimagesize($upload_data["full_path"]);
$wwater_w = $wwater_info[0];//
$wwater_h = $wwater_info[1];//
if(FOX_water=="on" && ($wwater_w>=FOX_water_w && $wwater_h>=FOX_water_h)){
$waterImage=$_SERVER["DOCUMENT_ROOT"]."/static/water.png";//
H::FoximageWaterMark($upload_data["full_path"],9,$waterImage);
}
}
AWS_APP::image()->initialize(array(
"quality" => 90,
"source_image" => $upload_data["full_path"],
"new_image" => $thumb_file[$key],
"width" => $val["w"],
"height" => $val["h"]
))->resize();
}
}