Jump to content

GD Image Help


Deserteye

Recommended Posts

I need help on this script:

[code]<?php

header ("Content-type: image/png");

$image = imagecreatefrompng("project.png");

$color = imagecolorallocate($image, 255, 255, 255);
$font = imageloadfont("verdana.ttf");
$string = "Text here";


imagestring($image, $font, 9, 10, $string, $color);

imagepng($image);
imagedestroy($image);

?>[/code]

It gives me an error saying there is something wrong with it. The problem is that when I try to load the font (imageloadfont()), thats when it gives me an error. But when I take the imageloadfont() function out, its ok but the font looks bad. So how do I load the verdana font?
Link to comment
https://forums.phpfreaks.com/topic/23044-gd-image-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.