Skip to content

Commit

Permalink
Merge branch 'PHP-7.0' into PHP-7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Sep 14, 2016
2 parents 1c8c61f + cf9e2fb commit 41001f8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ext/gd/tests/bug50194.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bug #50194 (imagettftext broken on transparent background w/o alphablending)
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!function_exists('imagettftext')) die('skip imagettftext() not available');
die('skip freetype issues');
//die('skip freetype issues');
?>
--FILE--
<?php
Expand All @@ -20,11 +20,19 @@ $font = __DIR__ . DIRECTORY_SEPARATOR . 'Tuffy.ttf';
imagettftext($im, 40, 0, 10, 40, $black, $font, $text);
imagesavealpha($im, true);

ob_start();
test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug50194.png', $im);
$output = ob_get_clean();
assert(preg_match('/The images are equal|The images differ in (\d+) pixels/', $output, $matches));
if (isset($matches[1]) && $matches[1] > 2000) {
echo "The images differ in {$matches[1]} pixels.\n";
} else {
echo "The images are similar.\n";
}

imagedestroy($im);
?>
===DONE===
--EXPECT--
The images are equal.
The images are similar.
===DONE===

0 comments on commit 41001f8

Please sign in to comment.