PHP Classes

[BUGFIX] Transparency

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  [BUGFIX] Transparency  >  (Un) Subscribe thread alerts  
Subject:[BUGFIX] Transparency
Summary:My solution to fix transparency problem
Messages:1
Author:Lukasz Jankowski
Date:2012-08-02 18:49:14
 

  1. [BUGFIX] Transparency   Reply   Report abuse  
Picture of Lukasz Jankowski Lukasz Jankowski - 2012-08-02 18:49:14
Hi ;)

I noticed that in some cases class generate wrong graphic control extension header and transparency flag isn't set.

Wrong example: 21 F9 04 08 00 00 00 00
Working example: 21 F9 04 09 00 00 00 00

We can fix it by changin one line of code. It's near the beginning of GIFAddFrames function (16th line):

Original:
$Locals_ext = "!\xF9\x04" . chr ( ( $this->DIS << 2 ) + 0 ) .

Fixed:
$Locals_ext = "!\xF9\x04" . chr ((( $this->DIS << 2 )) | 1 + 0 ) .

It sloves all my problems with transparency. I hope that will be helpfull for You. Sorry for the poor language

Kind regards
ukaszjankowski at gmail dot com