I'm using PHP 5.2.0 on IIS 6. I wonder what should I do to enable GD Jpeg support, I've already uncommented extension = hp_gd2.dll in php.ini but still not getting the expected result. Am I missing a step?
EDIT ----------> well using this code:
<?php
function LoadJpeg($imgname)
{
/* Attempt to open */
$im = @imagecreatefromjpeg($imgname);
/* See if it failed */
if(!$im)
{
/* Create a black image */
$im = imagecreatetruecolor(150, 30);
$bgc = imagecolorallocate($im, 255, 255, 255);
$tc = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
/* Output an error message */
imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc);
}
return $im;
}
header('Content-Type: image/jpeg');
$img = LoadJpeg('progressive.jpg');
imagejpeg($img);
imagedestroy($img);
?>
I expect to get progressive image load, but I get error instead. - I haven't recompile php after modifying php.ini <------ Should I? if so, how would I recompile php?