summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug22544-mb.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/tests/bug22544-mb.phpt')
-rw-r--r--ext/gd/tests/bug22544-mb.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/gd/tests/bug22544-mb.phpt b/ext/gd/tests/bug22544-mb.phpt
new file mode 100644
index 0000000000..0847214dc3
--- /dev/null
+++ b/ext/gd/tests/bug22544-mb.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #22544 (TrueColor transparency in PNG images).
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
+?>
+--FILE--
+<?php
+ $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);
+ include_once __DIR__ . '/func.inc';
+ test_image_equals_file(__DIR__ . '/bug22544私はガラスを食べられます.png', $image);
+?>
+--EXPECT--
+The images are equal.