Replace md5 image comparision with test_image_equals_file()

This commit is contained in:
Christoph M. Becker 2016-09-11 14:56:11 +02:00
parent b843d65599
commit 29cb3c89e5
2 changed files with 3 additions and 6 deletions

View File

@ -8,16 +8,13 @@ Bug #22544 (TrueColor transparency in PNG images).
?>
--FILE--
<?php
$dest = dirname(realpath(__FILE__)) . '/bug22544私はガラスを食べられます.png';
@unlink($dest);
$image = imageCreateTruecolor(640, 100);
$transparent = imageColorAllocate($image, 0, 0, 0);
$red = imageColorAllocate($image, 255, 50, 50);
imageColorTransparent($image, $transparent);
imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
imagegd($image, $dest);
echo md5_file($dest) . "\n";
@unlink($dest);
include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/bug22544私はガラスを食べられます.png', $image);
?>
--EXPECT--
7643ef115f642a79c2de6e411f485ddd
The images are equal.

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B