mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #77700: Writing truecolor images as GIF ignores interlace flag
This commit is contained in:
commit
bc7a871982
@ -144,7 +144,7 @@ static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
|
||||
BitsPerPixel = colorstobpp(tim->colorsTotal);
|
||||
/* All set, let's do it. */
|
||||
GIFEncode(
|
||||
out, tim->sx, tim->sy, tim->interlace, 0, tim->transparent, BitsPerPixel,
|
||||
out, tim->sx, tim->sy, interlace, 0, tim->transparent, BitsPerPixel,
|
||||
tim->red, tim->green, tim->blue, tim);
|
||||
if (pim) {
|
||||
/* Destroy palette based temporary image. */
|
||||
|
24
ext/gd/tests/bug77700.phpt
Normal file
24
ext/gd/tests/bug77700.phpt
Normal file
@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #77700 (Writing truecolor images as GIF ignores interlace flag)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatetruecolor(10, 10);
|
||||
imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
|
||||
imageinterlace($im, 1);
|
||||
imagegif($im, __DIR__ . 'bug77700.gif');
|
||||
|
||||
$im = imagecreatefromgif(__DIR__ . 'bug77700.gif');
|
||||
var_dump(imageinterlace($im));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . 'bug77700.gif');
|
||||
?>
|
Loading…
Reference in New Issue
Block a user