试图在php中已经存在的图像上画一些文字,但得到奇怪的结果。imagettftext给出奇怪的结果
下面是代码:
<?php
$font = "files/fonts/open_sans/OpenSans-Regular-webfont.ttf";
$image = imagecreatefrompng('images/icons/marker_icon.png');
$white = ImageColorAllocate($image, 255,255,255);
imagettftext($image, 1, 1, 1, 1, $white, $font, $_GET['count']);
header("content-type: image/png");
imagepng($image);
imagedestroy($image);
?>
第一次在图像上绘画,所以我不知道我做错了什么。
你用什么照片编辑器?我使用的是Photoshop,我试过这个,但它没有工作。 –
油漆哈哈。也许它与photoshop使用的颜色有关。 – spencdev