Bug #77700 [Asn->Csd]: Writing truecolor images as GIF ignores interlace flag
| From: | cmb@php.net | Date: | Tue, 05 Mar 2019 23:40:40 +0000 |
| Subject: | Bug #77700 [Asn->Csd]: Writing truecolor images as GIF ignores interlace flag | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219859@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77700&edit=1
ID: 77700
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: Writing truecolor images as GIF ignores interlace
flag
-Status: Assigned
+Status: Closed
Type: Bug
Package: GD related
Operating System: *
PHP Version: 7.2Git-2019-03-05 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=41fb0eaa116da34fa531437d5b87ca73089e4944
Log: Fix #77700: Writing truecolor images as GIF ignores interlace flag
Previous Comments:
------------------------------------------------------------------------
[2019-03-05 23:06:09] cmb@php.net
Description:
------------
Since GIF does not support truecolor images, a palette version of
the image is created with
gdImageCreatePaletteFromTrueColor()
internally. When actually converting to GIF, our bundled libgd
uses the interlace flag of the palette image, although it is not
retained by gdImageCreatePaletteFromTrueColor(). Upstream libgd
correctly uses the interlace flag of the original (truecolor)
image instead.
Test script:
---------------
<?php
$im = imagecreatetruecolor(10, 10);
imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
imageinterlace($im, 1);
imagegif($im, __DIR__ . '/test.gif');
$im = imagecreatefromgif(__DIR__ . '/test.gif');
var_dump(imageinterlace($im));
Expected result:
----------------
int(1)
Actual result:
--------------
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77700&edit=1