|
| 1 | +--TEST-- |
| 2 | +GH-17349 (Tiled truecolor filling looses single color transparency) |
| 3 | +--EXTENSIONS-- |
| 4 | +gd |
| 5 | +--FILE-- |
| 6 | +<?php |
| 7 | +require_once __DIR__ . "/func.inc"; |
| 8 | + |
| 9 | +$tile = imagecreatetruecolor(8, 8); |
| 10 | +$red = imagecolorallocate($tile, 255, 0, 0); |
| 11 | +imagefilledrectangle($tile, 0, 0, 7, 7, $red); |
| 12 | +imagecolortransparent($tile, $red); |
| 13 | + |
| 14 | +$im = imagecreatetruecolor(64, 64); |
| 15 | +$bg = imagecolorallocate($im, 255, 255, 255); |
| 16 | +imagefilledrectangle($im, 0, 0, 63, 63, $bg); |
| 17 | +imagecolortransparent($im, $bg); |
| 18 | +$fg = imagecolorallocate($im, 0, 0, 0); |
| 19 | +imageellipse($im, 31, 31, 50, 50, $fg); |
| 20 | +imagesettile($im, $tile); |
| 21 | +imagealphablending($im, false); |
| 22 | +imagefill($im, 31, 31, IMG_COLOR_TILED); |
| 23 | + |
| 24 | +test_image_equals_file(__DIR__ . "/gh17349.png", $im); |
| 25 | +?> |
| 26 | +--EXPECT-- |
| 27 | +The images are equal. |
0 commit comments