-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.4: Fix libgd 223: gdImageRotateGeneric() does not properly interpolate
- Loading branch information
Showing
3 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--TEST-- | ||
libgd bug 223 (gdImageRotateGeneric() does not properly interpolate) | ||
--EXTENSIONS-- | ||
gd | ||
--SKIPIF-- | ||
<?php | ||
if (!GD_BUNDLED) die("skip only for bundled libgd"); | ||
?> | ||
--FILE-- | ||
<?php | ||
require_once __DIR__ . "/func.inc"; | ||
|
||
$im = imagecreatetruecolor(64, 64); | ||
for ($j = 0; $j < 64; $j++) { | ||
for ($i = 0; $i < 64; $i++) { | ||
imagesetpixel($im, $i, $j, ($i % 2 || $j % 2) ? 0x000000 : 0xffffff); | ||
} | ||
} | ||
|
||
imagesetinterpolation($im, IMG_BICUBIC); | ||
$im = imagerotate($im, 45, 0xff0000); | ||
|
||
test_image_equals_file(__DIR__ . "/gd223.png", $im); | ||
?> | ||
--EXPECT-- | ||
The images are equal. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.