xref: /PHP-7.4/ext/gd/tests/bug79068.phpt (revision 4bec59f1)
1--TEST--
2Bug #79068 (gdTransformAffineCopy() changes interpolation method)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9require_once __DIR__ . '/func.inc';
10
11$src = imagecreatetruecolor(100, 100);
12imagefilledrectangle($src, 0, 0, 99, 99, 0xffffff);
13imageline($src, 10, 10, 90, 90, 0x000000);
14imagesetinterpolation($src, IMG_BSPLINE);
15imageaffine($src, [1, 1, 1, 1, 1, 1]);
16$dst = imagerotate($src, 80, 0xffffff);
17
18test_image_equals_file(__DIR__ . '/bug79068.png', $dst);
19?>
20--EXPECT--
21The images are equal.
22