...

View Full Version : Resolved Image contains errors??



Zangeel
06-19-2010, 07:27 AM
Hello,

I'm trying to load a PNG image I have as a signature with dynamic text on it. However, when I try to load it, it says The image "xxxxxxxxxxx" cannot be displayed because it contains errors", so I tried a different image and it gives me the same error. Here's the script im using



<?php
header("Content-Type: image/png");

$im = imagecreatefrompng("sig.png");

if (!$im)
{
die ('Error');
}

$sText = imagecolorallocate($im, 255,255,255);

imagestring($im, 10, 10, 10, "Testing", $sText);

imagepng($im);

imagedestroy($im);

?>

Zangeel
06-19-2010, 07:35 AM
Woops ^^ just moved the header down to above the imagepng function silly mistake!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum