<?php
/**
 * Project:        M.VuiZ.Net
 * Author:         nampt.me <admin@vuiz.net>
 * Copyright:      © 2025 vuiz.net All rights reserved.
 */
header('Content-Type: image/png');
header('Content-disposition: attachment;filename="logo.png"');
//co chu
$size= 25;

$angel= 0;
$text1 = empty($_GET['text1']) ? 'VuiZ' : $_GET['text1'];
$text2 = empty($_GET['text2']) ? '.Net' : $_GET['text2'];
$font= __DIR__.'/DSBroadBrush.ttf';


$bbox1= imagettfbbox($size,$angel,$font,$text1);
$bbox2= imagettfbbox($size,$angel,$font,$text2);

$rong= $bbox1[2] + $bbox2[2] + 10;
$cao = 88;
$vt  = $bbox1[2];

//tao anh moi
$im = imagecreatetruecolor($rong,$cao);
$tea = imagecreatefrompng('tea.png');
//dinh dang mau sac
$green = imagecolorallocate($im,40,102,33);
$blue = imagecolorallocate($im,3,46,88);

//transparen
imagesavealpha($im, true);
$transparent = imagecolorallocatealpha($im, 0, 0, 0, 127);
imagefill($im, 0, 0, $transparent);


imagecopyresized($im,$tea,$rong-85,5,0,0,70,70,imagesx($tea),imagesy($tea));
// the shadow 
imagefttext($im, $size, $angel, 0, 80, $green, $font,$text1);
imagefttext($im, $size, $angel, $vt, 80, $blue, $font,$text2);

imagepng($im);
imagedestroy($im);

?>