Hello everybody,
I'm needing help with GD.
This is what the image looks like but I use "imageCreateFromPNG" It makes the image look bad.
It looks like this.
Anyone know how to fix this,
Thanks.
Image help
Moderator: General Moderators
- markusn00b
- Forum Contributor
- Posts: 298
- Joined: Sat Oct 20, 2007 2:16 pm
- Location: York, England
Re: Image help
How is it possible for us to know the problem without seeing the code you use to create the image?!
Post up, with relevant code tags.
Post up, with relevant code tags.
Re: Image help
That's a 24 bit PNG isn't it? You're doing something that wrecks the alpha channel.
Re: Image help
markusn00b wrote:How is it possible for us to know the problem without seeing the code you use to create the image?!
Post up, with relevant code tags.
Code: Select all
include 'countdown.php';
$count = countdown(4,29,2009);
header("Content-type: image/png");
$string = "Days: " . $count[ 'days' ] . " Hours: " . $count[ 'hours' ] . " Minutes: " . $count[ 'minutes' ] . " Seconds: " . $count[ 'seconds' ] . " to GTA:IV";
$im = imageCreateFromPNG("http://127.0.0.1/smf/pic/gtaiv.png");
$color = imagecolorallocate($im, 0, 0, 0);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagettftext($im,10,0,$px,20,$color,"ARLRDBD.ttf",$string);
imagepng($im);
imagedestroy($im);How would I do that?onion2k wrote:That's a 24 bit PNG isn't it? You're doing something that wrecks the alpha channel.
Re: Image help
I'm still needing help.