ID: 40428
Updated by: [EMAIL PROTECTED]
Reported By: v1d4l0k4 at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: GD related
Operating System: Windows XP SP2
PHP Version: 5.2.1
-Assigned To:
+Assigned To: pajoye
Previous Comments:
------------------------------------------------------------------------
[2007-02-10 07:42:55] v1d4l0k4 at gmail dot com
Description:
------------
Manual says:
array imagepstext ( resource $image, string $text, resource $font, int
$size, int $foreground, int $background, int $x, int $y [, int $space
[, int $tightness [, float $angle [, int $antialias_steps]]]] )
array imagepsbbox ( string $text, int $font, int $size [, int $space [,
int $tightness [, float $angle]]] )
But... neither of the optional parameters is accepted.
Reproduce code:
---------------
It's Ok:
<?php
header('Content-type: image/png');
$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);
?>
It's fail:
<?php
header('Content-type: image/png');
$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40, 2);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);
?>
Expected result:
----------------
A banner with 2 space-unit of space.
Actual result:
--------------
Warning: Wrong parameter count for imagepstext()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40428&edit=1