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