From: rameezsoomro dot pk at live dot com
Operating system: Win 7
PHP version: 5.4.9
Package: GD related
Bug Type: Bug
Bug description:5.16.1
Description:
------------
Note: I i've choose wrong version on PHP Version list because my php
version not
available on list option...
I am using xampp on localhost/computer with Apache/2.4.3 (Win32)
OpenSSL/1.0.1c
PHP/5.4.7
imagefttext or imagettftext both function are return a blank image (null)
and my
gd library was also enable ...tell me what should i do...
Test script:
---------------
// Set the content-type
header('Content-Type: image/png');
// Create the image
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = 'arial.ttf';
// Add some shadow to the text
imagefttext($im, 20, 0, 11, 21, $grey, $font, $text);
// Add the text
imagefttext($im, 20, 0, 10, 20, $black, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
--
Edit bug report at https://bugs.php.net/bug.php?id=63708&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=63708&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=63708&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=63708&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63708&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63708&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63708&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63708&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63708&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63708&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63708&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63708&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63708&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63708&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63708&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63708&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63708&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63708&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63708&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63708&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63708&r=mysqlcfg