I am new to php and have run into one problem with one of the scripts I have
found and I am unsure of how to correct the problem.
My Web Host is currently running PHP Version 4.1.2 and PHP Info returns the
following information for the GD module.
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
The problem is the script I am using has functions used in it that were not
available in this version of GD. Here is the code for the script.
$src = imagecreatefrom jpeg("$image");
$im = imagecreatetrue color($newwidth ,$newheight);
imagecopyresamp led($im,$src,0, 0,0,0,$newwidth ,$newheight,$wi dth,$height);
imagejpeg($im, '',85);
imagedestroy($i m);
From what I have been able to find out.
The following two functions were not available until GD 2.0
imagecreatetrue color
imagecopyresamp led
And imagejpeg Requires GD 1.8
Any suggestions on how to rewrite this script to use the older GD 1.6.2?
This code is used to create all of the thumb nails dynamically. I had the
entire site ready to go online and tested on my home system running Apache
and PHP 4.3.3 and once it was uploaded the gallery stopped working..
Any help would be greatly appreciated.
found and I am unsure of how to correct the problem.
My Web Host is currently running PHP Version 4.1.2 and PHP Info returns the
following information for the GD module.
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
The problem is the script I am using has functions used in it that were not
available in this version of GD. Here is the code for the script.
$src = imagecreatefrom jpeg("$image");
$im = imagecreatetrue color($newwidth ,$newheight);
imagecopyresamp led($im,$src,0, 0,0,0,$newwidth ,$newheight,$wi dth,$height);
imagejpeg($im, '',85);
imagedestroy($i m);
From what I have been able to find out.
The following two functions were not available until GD 2.0
imagecreatetrue color
imagecopyresamp led
And imagejpeg Requires GD 1.8
Any suggestions on how to rewrite this script to use the older GD 1.6.2?
This code is used to create all of the thumb nails dynamically. I had the
entire site ready to go online and tested on my home system running Apache
and PHP 4.3.3 and once it was uploaded the gallery stopped working..
Any help would be greatly appreciated.
Comment