mirror of
https://github.com/php/php-src.git
synced 2024-09-28 21:36:12 +00:00
fa53d8463f
imagescale(..., IMG_BICUBIC) is not supposed to work with palette images, so we
fix that by converting to true color if necessary. Basically the same fix has
already been applied to the external libgd[1].
[1] <723ea520be
>
16 lines
291 B
PHP
16 lines
291 B
PHP
--TEST--
|
|
Bug #69024 (imagescale segfault with palette based image)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreate(256, 256);
|
|
imagescale($im, 32, 32, IMG_BICUBIC);
|
|
imagedestroy($im);
|
|
echo "done\n";
|
|
?>
|
|
--EXPECT--
|
|
done
|