I am trying to change the size of a drawing so they are all 3x3.
the script below is what i was trying to use to cut it in half ... I
get errors.
I can display the normal picture but not the results of the picture
half the size. The PHP I have installed support 1.62 or higher. And
all I would like to do is take and image and make it fit a 3x3.
Any suggestions to where I should read or look would be appreciated.
TIA
############### code ####################################
<?
$i = "$image.jpg";
echo "<br>my working file is $i";
$src = ImageCreateFromJPEG($i);
$width = ImageSx($src);
$height = ImageSy($src);
$x = $width/2;
$y = $height/2;
$dst = ImageCreateTrueColor($x,$y);
ImageCopyResampled($dst, $src, 0,0,0,0,$x,$y,$width,$height);
ImagePNG($dst);
?>
#################### error #########################################
Warning: imagecreatefromjpeg: Unable to open '13727.jpg' for reading
in /var/www/html/viewer.php on line 75
Warning: imagesx(): supplied argument is not a valid Image resource in
/var/www/html/viewer.php on line 76
Warning: imagesy(): supplied argument is not a valid Image resource in
/var/www/html/viewer.php on line 77
Warning: imagecreatetruecolor(): requires GD 2.0 or later in
/var/www/html/viewer.php on line 80
Warning: imagecopyresampled(): requires GD 2.0 or later in
/var/www/html/viewer.php on line 81
Warning: imagepng(): supplied argument is not a valid Image resource
in /var/www/html/viewer.php on line 82
// Larry