php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63708 imagefttext or imagettftext both function are return a blank image
Submitted: 2012-12-06 11:42 UTC Modified: 2012-12-08 02:37 UTC
From: rameezsoomro dot pk at live dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.4.9 OS: Win 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rameezsoomro dot pk at live dot com
New email:
PHP Version: OS:

 

 [2012-12-06 11:42 UTC] rameezsoomro dot pk at live dot com
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);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-08 02:37 UTC] sixd@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2012-12-08 02:37 UTC] sixd@php.net
-Summary: 5.16.1 +Summary: imagefttext or imagettftext both function are return a blank image -Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC