span style="color: #0000BB"><?php$img = 'file.jpg';$wh = getimagesize('cop.png'); //копирайт$fh = getimagesize($img); //файл$sx=$fh[0]-$wh[0]-3;$sy=$fh[1]-$wh[1]-5;$rfile = imagecreatefromjpeg($img);imagecopy($rfile, $rwatermark, $sx, $sy, 0, 0, $wh[0], $wh[1]);imagejpeg($rfile,'filecop.jpg'); //сохраняемimagedestroy($rfile); |
span style="color: #0000BB"><?php$arr = array('20','55','7','189','102','27','200','76','300','210');$arrX = array('Q','W','E','R','T','Y','U','I','O','P');$vizit = 700;Header("Content-type: image/png");$imageY = 150; $im = imageCreate(370, $imageY);//300x120 $colors = imageColorAllocate($im, 0, 0, 0); $color1 = imageColorAllocate($im, 0, 110, 240);for ($x=1; $x<=10; $x++){ $h = round(($arr[$x-1]*$imageY)/$vizit); imageFilledRectangle($im,$x*34-13,$imageY-$h,$x*34+13, $imageY-10, $color1); ImageString ($im, 0, $x*34-13, $imageY-$h-10, round(($arr[$x-1] * 100 / $vizit),1).'%', $color1); } imagePng($im); imageDestroy($im); |
span style="color: #0000BB"><?php$arr = array('20','55','7','189','102','27','200','76','300','210');$arrX = array('Q','W','E','R','T','Y','U','I','O','P');$visit = 700;//header("Content-type: image/png");$imageY = 150;$im = imagecreate(370, $imageY); //300x120$colors = imagecolorallocate($im, 0, 0, 0);$color1 = imagecolorallocate($im, 0, 110, 240);for ($x = 1; $x <= 10; $x++) { $h = round(($arr[$x - 1] * $imageY) / $visit); $xImageLeft = $x * 34 - 13; $xImageRight = $x * 34 + 13; $yImageLeft = $imageY - $h - 10; $yImageRight = $imageY - 10; $yImageRightPercent = $yImageLeft - 10; $percentString = round(($arr[$x - 1] * 100 / $visit), 1) . '%'; imagefilledrectangle($im, $xImageLeft, $yImageLeft, $xImageRight, $yImageRight, $color1); imagestring($im, 0, $xImageLeft, $yImageRightPercent, $percentString, $color1);}imagepng($im, '/test.png');imagedestroy($im); |