<?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"');
//gia tri
$size= 20;
$angel= 0;
$text= empty($_GET['text']) ? 'VuiZ.Net' : $_GET['text'];
$font= __DIR__.'/FELTMARK.TTF';
$cao= 33;
$bbox= imagettfbbox($size,$angel,$font,$text);
$rong= $bbox[2] + 34;
//tao anh moi
$im = imagecreatetruecolor($rong,$cao);
$bird = imagecreatefrompng('anroid.png');
//dinh dang mau sac
$white = imagecolorallocate($im,255,255,255);
$red= imagecolorallocate($im,255,0,0);
$trans = imagecolorallocatealpha($im,255,255,255,127);
$xanh = imagecolorallocate($im,51,
	204,
	0);
imagealphablending($im, FALSE);
imagesavealpha($im,TRUE);
//in van ban
imagefilledrectangle($im,0,0,$rong,$cao,$trans);
imagecopy($im,$bird,0,1,0,0,imagesx($bird),imagesy($bird));
if($_GET['color'] == 1 || !isset($_GET['color']))
	$color = $xanh;
elseif($_GET['color'] == 2)
	$color = $red;

imagettftext($im,$size,$angel,29,23,$color,$font,$text);
//Xuat and pha huy
imagepng($im);
imagedestroy($im);
?>