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