#23444 [Csd->Asn]: Document php_gd.dll was removed in 4.3.2
| From: | goba@php.net | Date: | Fri, 09 May 2003 15:22:24 +0000 |
| Subject: | #23444 [Csd->Asn]: Document php_gd.dll was removed in 4.3.2 | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969353301@lists.php.net to get a copy of this message | ||
ID: 23444
Updated by: goba@php.net
Reported By: aaron_hawryluk at shaw dot ca
-Status: Closed
+Status: Assigned
Bug Type: Documentation problem
Operating System: windows 2000
PHP Version: 4.3.1
Assigned To: philip
New Comment:
This is not a place for support questions, and so 'support answers'
should not mark bugs as closed. Reassign to Philip.
Previous Comments:
------------------------------------------------------------------------
[2003-05-09 10:16:41] aaron_hawryluk at shaw dot ca
One note for Windows users should maybe be (and I'm not sure if this
has already been fixed in the new distribution of php) that you need
the FULL (ie. non-installer-based) version of PHP and you need to
change the line extension=php_gd.dll to extension=php_gd2.dll. At
least, I had to. With those changes, the problem is fixed.
------------------------------------------------------------------------
[2003-05-01 17:45:51] philip@php.net
You have a very old version of the manual but anyway the following is
from ref.image:
To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD
base install directory. To use the recommended bundled version of the
GD library configure --with-gd. In Windows you'll include php_gd2.dll
as an extension in php.ini. There is also php_gd.dll for GD1 but it's
not preferred.
And this is from the imagecopyresampled() docs:
Note: imagecopyresampled() requires GD 2.0.l or greater.
Also, php_gd.dll is no longer bundled as of PHP 4.3.2 so hopefully this
problem will just go away! ;)
This bug will remain open until it's documented that php_gd.dll was
removed in 4.3.2, assigning to self, and changing summary. Also,
ref.image should be expanded to mention some image functions require
GD2. I believe each function that does require GD2 already mentions
this requirement.
What do you think about all of this?
------------------------------------------------------------------------
[2003-05-01 16:40:13] aaron_hawryluk at shaw dot ca
On further examination, PHP was using php_gd.dll instead of
php_gd2.dll, altering this appears to have fixed the issue. However,
further documentation of this feature should be included in a future
release, as it was VERY difficult to find any info on gd under Windows
anywhere on the web... loads of support for UNIX, but that doesn't
really help with the .dll problem.
It appears to be only the 24-bit image functions that won't work
'out-of-the-box' under the older php_gd.dll. Perhaps the chm docs
could include a section on how to get all functions properly working
under Windows.
------------------------------------------------------------------------
[2003-05-01 16:22:16] aaron_hawryluk at shaw dot ca
I have found a bug on page function.imagecopyresampled.html
[chm date: 2002-12-27]...
imagecopyresampled does not appear to apply to the Win32 version of PHP
4.3.1 running the included php_gd.dll (zip version download from
php.net). The function is undefined and causes fatal errors when
called.
This works:
<?php
header("Content-type: image/jpeg");
$im = imagecreate (150, 30); /* Create a blank image */
$bgc = imagecolorallocate ($im, 255, 255, 255);
$tc = imagecolorallocate ($im, 0, 0, 0);
imagefilledrectangle ($im, 5, 5, 145, 25, $bgc);
imagestring ($im, 1, 5, 5, "This is an image.", $tc);
$aspect = 150/30;
$naspect = 1/$aspect;
$destimg = imagecreate(300,100);
imagecopyresized($destimg,$im,0,0,0,0,300,100,150,30);
imagejpeg($destimg);
?>
This does not:
<?php
header("Content-type: image/jpeg");
$im = imagecreate (150, 30); /* Create a blank image */
$bgc = imagecolorallocate ($im, 255, 255, 255);
$tc = imagecolorallocate ($im, 0, 0, 0);
imagefilledrectangle ($im, 5, 5, 145, 25, $bgc);
imagestring ($im, 1, 5, 5, "This is an image.", $tc);
$aspect = 150/30;
$naspect = 1/$aspect;
$destimg = imagecreate(300,100);
imagecopyresampled($destimg,$im,0,0,0,0,300,100,150,30);
imagejpeg($destimg);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23444&edit=1