| Server IP : 104.21.37.246 / Your IP : 172.71.28.146 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/numerology/ |
Upload File : |
<?php
//By aPinan
//GPL License
//Have fun..!
function watermarkImage_1 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p5,$p6,$p7, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 80, 0,150, 330, $white, $font, $p1);
imagettftext($image_p, 30, 0,150, 420, $black, $font, $p2);
imagettftext($image_p, 30, 0,150, 500, $black, $font, $p3);
imagettftext($image_p, 80, 0,390, 330, $white, $font, $p5);
imagettftext($image_p, 30, 0,390, 420, $black, $font, $p6);
imagettftext($image_p, 30, 0,390, 500, $black, $font, $p7);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_2 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p5,$p6,$p7,$p8, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 80, 0,95, 290, $white, $font, $p1);
imagettftext($image_p, 30, 0,95, 400, $black, $font, $p2);
imagettftext($image_p, 30, 0,95, 480, $black, $font, $p3);
imagettftext($image_p, 80, 0,340, 290, $white, $font, $p5);
imagettftext($image_p, 30, 0,340, 400, $black, $font, $p6);
imagettftext($image_p, 30, 0,340, 480, $black, $font, $p7);
imagettftext($image_p, 30, 0,100, 600, $black, $font, $p8);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_3 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
if($p1 <> ' ') {imagettftext($image_p, 80, 0,75, 290, $black, $font, $p1); }
if($p2 <> ' ') {imagettftext($image_p, 80, 0,220, 290, $black, $font, $p2); }
if($p3 <> ' ') {imagettftext($image_p, 80, 0,360, 290, $black, $font, $p3); }
if($p4 <> ' ') {imagettftext($image_p, 80, 0,75, 425, $black, $font, $p4); }
if($p5 <> ' ') {imagettftext($image_p, 80, 0,220, 425, $black, $font, $p5); }
if($p6 <> ' ') {imagettftext($image_p, 80, 0,360, 425, $black, $font, $p6); }
if($p7 <> ' ') {imagettftext($image_p, 80, 0,75, 580, $black, $font, $p7); }
if($p8 <> ' ') {imagettftext($image_p, 80, 0,220, 580, $black, $font, $p8); }
if($p9 <> ' ') {imagettftext($image_p, 80, 0,360, 580, $black, $font, $p9); }
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_4 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 80, 0,220, 275, $white, $font, $p1);
imagettftext($image_p, 28, 0,380, 260, $black, $font, $p2);
imagettftext($image_p, 30, 0,80, 350, $black, $font, $p3);
imagettftext($image_p, 30, 0,170, 350, $black, $font, $p4);
imagettftext($image_p, 30, 0,320, 350, $black, $font, $p5);
imagettftext($image_p, 30, 0,400, 350, $black, $font, $p6);
imagettftext($image_p, 80, 0,220, 500, $white, $font, $p7);
imagettftext($image_p, 28, 0,380, 485, $black, $font, $p8);
imagettftext($image_p, 30, 0,80, 573, $black, $font, $p9);
imagettftext($image_p, 30, 0,170, 573, $black, $font, $p10);
imagettftext($image_p, 30, 0,320, 573, $black, $font, $p11);
imagettftext($image_p, 30, 0,400, 573, $black, $font, $p12);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_5 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 50, 0,140, 220, $black, $font, $p1);
imagettftext($image_p, 50, 0,230, 220, $black, $font, $p2);
imagettftext($image_p, 50, 0,315, 220, $black, $font, $p3);
imagettftext($image_p, 28, 0,120, 300, $black, $font, $p4);
imagettftext($image_p, 28, 0,150, 370, $black, $font, $p5);
imagettftext($image_p, 50, 0,140, 465, $black, $font, $p6);
imagettftext($image_p, 50, 0,230, 465, $black, $font, $p7);
imagettftext($image_p, 50, 0,315, 465, $black, $font, $p8);
imagettftext($image_p, 28, 0,150, 540, $black, $font, $p9);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_6 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 90, 0,210, 250, $black, $font, $p1);
imagettftext($image_p, 50, 0,190, 340, $black, $font, $p2);
imagettftext($image_p, 20, 0,80, 400, $black, $font, $p3);
imagettftext($image_p, 50, 0,60, 470, $black, $font, $p4);
imagettftext($image_p, 30, 0,50, 530, $black, $font, $p5);
imagettftext($image_p, 30, 0,50, 580, $black, $font, $p6);
imagettftext($image_p, 30, 0,50, 620, $black, $font, $p7);
imagettftext($image_p, 20, 0,330, 400, $black, $font, $p8);
imagettftext($image_p, 50, 0,320, 470, $black, $font, $p9);
imagettftext($image_p, 30, 0,310, 530, $black, $font, $p10);
imagettftext($image_p, 30, 0,310, 580, $black, $font, $p11);
imagettftext($image_p, 30, 0,310, 620, $black, $font, $p12);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_7 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16,$p17,$p18, $DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 50, 0,35, 315, $black, $font, $p1);
imagettftext($image_p, 50, 0,105, 315, $black, $font, $p2);
imagettftext($image_p, 50, 0,180, 315, $black, $font, $p3);
imagettftext($image_p, 28, 0,40, 390, $black, $font, $p4);
imagettftext($image_p, 28, 0,140, 390, $black, $font, $p5);
imagettftext($image_p, 28, 0,40, 450, $black, $font, $p6);
imagettftext($image_p, 28, 0,140, 450, $black, $font, $p7);
imagettftext($image_p, 28, 0,40, 510, $black, $font, $p8);
imagettftext($image_p, 28, 0,140, 510, $black, $font, $p9);
imagettftext($image_p, 50, 0,275, 315, $black, $font, $p10);
imagettftext($image_p, 50, 0,350, 315, $black, $font, $p11);
imagettftext($image_p, 50, 0,425, 315, $black, $font, $p12);
imagettftext($image_p, 28, 0,290, 390, $black, $font, $p13);
imagettftext($image_p, 28, 0,390, 390, $black, $font, $p14);
imagettftext($image_p, 28, 0,290, 450, $black, $font, $p15);
imagettftext($image_p, 28, 0,390, 450, $black, $font, $p16);
imagettftext($image_p, 28, 0,290, 510, $black, $font, $p17);
imagettftext($image_p, 28, 0,390, 510, $black, $font, $p18);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
function watermarkImage_8 ($SourceFile, $WaterMarkText,$p1,$p2,$p3,$p4,$p5,$p6,$p7, $p8,$p9,$p10,$p11,$p12,$DestinationFile) {
putenv('GDFONTPATH=' . realpath('.'));
list($width, $height) = getimagesize($SourceFile);
//$height = 633;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($SourceFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);//กำหนดสีดำ
$white = imagecolorallocate($image_p, 255, 255, 255);//กำหนดสี,
// $font = 'THA0006.ttf';//กำหนดชื่อฟอนต์
$font = 'tahomabd.ttf';
imagettftext($image_p, 20, 0, 170, 50, $black, $font, $WaterMarkText);
imagettftext($image_p, 50, 0,150, 210, $black, $font, $p1);
imagettftext($image_p, 50, 0,230, 210, $black, $font, $p2);
imagettftext($image_p, 50, 0,310, 210, $black, $font, $p3);
imagettftext($image_p, 50, 0,150, 360, $black, $font, $p4);
imagettftext($image_p, 50, 0,230, 360, $black, $font, $p5);
imagettftext($image_p, 50, 0,310, 360, $black, $font, $p6);
imagettftext($image_p, 30, 0,90, 430, $black, $font, $p7);
imagettftext($image_p, 30, 0,220, 430, $black, $font, $p8);
imagettftext($image_p, 30, 0,350, 430, $black, $font, $p9);
imagettftext($image_p, 30, 0,90, 500, $black, $font, $p10);
imagettftext($image_p, 30, 0,220, 500, $black, $font, $p11);
imagettftext($image_p, 30, 0,350, 500, $black, $font, $p12);
if ($DestinationFile<>'') {
imagejpeg ($image_p, $DestinationFile, 100);
} else {
header('Content-Type: image/jpeg');
imagejpeg($image_p, null, 100);
};
imagedestroy($image);
imagedestroy($image_p);
};
?>