xref: /PHP-7.2/ext/gd/tests/bug73272.phpt (revision 3f72c77c)
1--TEST--
2Bug #73272 (imagescale() is not affected by, but affects imagesetinterpolation())
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
10
11$src = imagecreatetruecolor(100, 100);
12imagefilledrectangle($src, 0,0, 99,99, 0xFFFFFF);
13imageellipse($src, 49,49, 40,40, 0x000000);
14
15imagesetinterpolation($src, IMG_NEAREST_NEIGHBOUR);
16imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
17$dst = imagerotate($src, 60, 0xFFFFFF);
18
19test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug73272.png', $dst);
20?>
21===DONE===
22--EXPECT--
23The images are equal.
24===DONE===
25