Bug #61319 [Fbk->NoF]: Image produced on php-5.3.3. differs from same image produced with php-5.2.5
| From: | php-bugs at lists dot php dot net | Date: | Sun, 18 Jan 2015 04:22:25 +0000 |
| Subject: | Bug #61319 [Fbk->NoF]: Image produced on php-5.3.3. differs from same image produced with php-5.2.5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190022@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61319&edit=1
ID: 61319
Updated by: php-bugs@lists.php.net
Reported by: lior dot kuyer at gfk dot com
Summary: Image produced on php-5.3.3. differs from same image
produced with php-5.2.5
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: GD related
Operating System: Open suse
PHP Version: 5.3.10
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2015-01-07 23:26:09] danack@php.net
Neither of these versions is supported any more.
If you think that the image generation is incorrect in a supported version, please can you let us
know, as well as providing the example image generated on your machine on a service like imgur.
For a lot of issues where images are generated incorrectly, the issue is dependent on your local
environment so providing the image you are seeing is required to allow the issue to be investigated.
------------------------------------------------------------------------
[2012-03-07 15:05:56] lior dot kuyer at gfk dot com
updated summary
------------------------------------------------------------------------
[2012-03-07 15:01:24] lior dot kuyer at gfk dot com
Description:
------------
Image production with gdlib has changed between php
php-5.2.5 and php-5.3.3. Run the attached test script on both versions to see the
difference.
Test script:
---------------
<?php
$text = "abcdefghijklmnopqrstuvwxyz\n";
$text.= strtoupper("abcdefghijklmnopqrstuvwxyz")."\n";
$text .= "abcdefghijklmnopqrstuvwxyz\n";
$text.= strtoupper("abcdefghijklmnopqrstuvwxyz")."\n";
$text .= "abcdefghijklmnopqrstuvwxyz\n";
$text.= strtoupper("abcdefghijklmnopqrstuvwxyz")."\n";
$text .= "abcdefghijklmnopqrstuvwxyz\n";
$text.= strtoupper("abcdefghijklmnopqrstuvwxyz")."\n";
$text.= "01234567890123456789\n";
$text.= "!@#$%^&*()_+=-][}{\\|'\";:/?.>,<";
$fontdir = './';
putenv('GDFONTPATH='.$fontdir);
$font = 'verdana.ttf';
$box = imagettfbbox ( 7.5 , 0 , $font , $text );
$width = abs($box[4] - $box[0]);
$height = abs($box[5] - $box[1]);
// Create the image
$im = imagecreatetruecolor($width, $height);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, $width, $height, $white);
// Add the text
imagettftext($im, 7.5, 0, 1, 10, $black, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
// Set the content-type
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61319&edit=1