$height = Mapa::getTileAreaHeight(); $height -= floor(Mapa::getHexWidth() / 2); $image2 = imagecreatetruecolor($width, $height); imagealphablending($image2, false); imagesavealpha($image2, true); $bg = imagecolorallocatealpha($image2, 255, 255, 255, 127); imagefilledrectangle($image2, 0, 0, $width, $height, $bg); } else { $image = Mapa::gerarConfiguracao(); $width = imagesx($image); $height = imagesy($image); $height -= floor(Mapa::getHexWidth() / 2); $image2 = imagecreatetruecolor($width, $height); imagecopy($image2, $image, 0, 0, 0, 0, $width, imagesy($image)); } $arte->carregarArquivo(); $arte->resizeToHeight($altura); $token = $arte->getImagem(); $dst_w = imagesx($token); $dst_h = $altura; $dst_x = floor(($width - $dst_w) / 2) + $margin_left; $dst_y = floor(($height - $dst_y) / 2) + $margin_top; if ($rotate > 0) { $bg = imagecolorallocatealpha($token, 0, 0, 0, 127); $token = imagerotate($token, $rotate, $bg); } imagecopyresampled($image2, $token, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w, $dst_h); if ($gerar) { $x = floor(($width - 420) / 2); $y = 140; //$cor = imagecolorallocate($image2, 0, 0, 0);