Home » Images » Image_Transform » Bug #1402
GD driver failing to use GD2
Details
| Submitted | 2004-05-13 21:35 UTC |
|---|---|
| From | eln at gmx dot net |
| Assigned | reywob |
| Status | Closed |
| Package | Image_Transform |
| PHP Version | 4.3.5 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-05-13 21:35 UTC] eln at gmx dot net
Description:
------------
Using PHP 4.3.5 with GD2, Image_Transform 0.8 and the GD
driver,
Image_Transform fails to use the GD2 functions even
though they are
available.
The problem lies with this line:
if (function_exists('ImageCreateTrueColor') &&
@ImageCreateTrueColor())
{
and the same for ImageCopyResampled.
function_exists('ImageCreateTrueColor') returns true,
but
@ImageCreateTrueColor() returns NULL because it does not
get the
arguments it wants.
The reason why it is used must be because PHP with GD1
also includes the
function ImageCreateTrueColor, but fails with a fatal
error when used.
One way of solving the problem is to remove the call to
ImageCreateTrueColor in the if and call it with the real
parameters and
see what it returns.
I have created a diff (against CVS) which solves the
problem this way:
http://ununique.net/div/gd.php.diff
It works for me at least, but it might need some more
testing.