Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Bigha

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

1,842 profile views

Bigha's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputation

  1. .htaccess RewriteEngine On RewriteBase / RewriteRule ^папка_относительный путь/(.+).jpeg$ inc/block/wmark.php?src=/папка_относительный путь/$1.jpeg wmark.php <?php class watermark { function create_watermark( $main_img_obj, $text, $font, $r = 255, $g = 255, $b = 255, $alpha_level = 120 ) { $width = imagesx($main_img_obj); $height = imagesy($main_img_obj); $angle = -rad2deg(atan2((-$height),($width))); $text = " ".$text." "; $c = imagecolorallocatealpha($main_img_obj, $r, $g, $b, $alpha_level); $shadow = imagecolorallocatealpha($main_img_obj, 0, 0, 0, $alpha_level); $size = (($width+$height)/2)*2/strlen($text); $box = imagettfbbox ( $size, $angle, $font, $text ); $x = $width/2 - abs($box[4] - $box[0])/2; $y = $height/2 + abs($box[5] - $box[1])/2; imagettftext($main_img_obj,$size ,$angle, $x+2, $y+1, $shadow, $font, $text); imagettftext($main_img_obj,$size ,$angle, $x, $y, $c, $font, $text); return $main_img_obj; } } header("Content-type: image/jpeg"); $watermark = new watermark(); $img = imagecreatefromjpeg($_SERVER['DOCUMENT_ROOT'].$_GET['src']); $im=$watermark->create_watermark($img," ваш_сайт.ru ",$_SERVER['DOCUMENT_ROOT'].'/inc/block/geo.ttf',255,255,255,112); imagejpeg($im,NULL,75); imagedestroy($img); imagedestroy($im); ?> файл с шрифтом geo.ttf geo.ttf
  2. Есть бесплатный способ, динамическое добавление полупрозрачной текстовой надписи через хтацесс, пшп скрипт, и файл с шрифтами(тру тайп) Как выглядит можно посмотреть тут - Продажа биотуалетов и туалетных кабин
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.