xref: /php-src/ext/gd/tests/bug22544-mb.phpt (revision 0b8466f2)
1--TEST--
2Bug #22544 (TrueColor transparency in PNG images).
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!(imagetypes() & IMG_PNG)) {
8    die("skip No PNG support");
9}
10?>
11--FILE--
12<?php
13    $image = imageCreateTruecolor(640, 100);
14    $transparent = imageColorAllocate($image, 0, 0, 0);
15    $red = imageColorAllocate($image, 255, 50, 50);
16    imageColorTransparent($image, $transparent);
17    imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
18    include_once __DIR__ . '/func.inc';
19    test_image_equals_file(__DIR__ . '/bug22544私はガラスを食べられます.png', $image);
20?>
21--EXPECT--
22The images are equal.
23