Код |
---|
if(strlen($waterPath)>0) // водный знак { $arwater_img = getimagesize($waterPath); $water_width = $arwater_img[0]; $water_height = $arwater_img[1]; $water_img_type = $arwater_img[2]; $water_img_type = $arwater_img[$water_img_type-1]; $water_img_size = $arwater_img[3]; $water_img = imagecreatefrompng($waterPath); $wbg = imagecolorallocate($water_img, 255, 255, 255); imagecopy ($img_dest, $water_img, $x_water, $y_water, 0, 0, $water_width, $water_height); } |
Код |
---|
header("Content-type: image/png"); $res = imagecreate(468,297); $img = imagecreatefromjpeg("photo.JPG"); imagetruecolortopalette($img,true,250); $logo = imagecreatefrompng("logo.PNG"); $white= imagecolorallocate($res,255,255,255); imagecopyresized ($res,$img, 0,0, 0,0, 468,297, imagesx($img),imagesy($img)); imagecopy ($res,$logo,352,228,0,0,116,69); $trans= imagecolorallocate($res,255,0,255); imagecolortransparent($res,$trans); imagepng($res); |