diff --git a/src/GifCreator/AnimGif.php b/src/GifCreator/AnimGif.php index 727ac6c..40165bd 100644 --- a/src/GifCreator/AnimGif.php +++ b/src/GifCreator/AnimGif.php @@ -203,7 +203,7 @@ public function create($frames, $durations = self::DEFAULT_DURATION, $loop = 0) } if ($i == 0) { - $this->transparent_color = imagecolortransparent($resourceImg); + $this->transparent_color = -1; } for ($j = (13 + 3 * (2 << (ord($this->frameSources[$i] { 10 }) & 0x07))), $k = TRUE; $k; $j++) { diff --git a/test/index.php b/test/index.php index 94b119f..49bc1df 100644 --- a/test/index.php +++ b/test/index.php @@ -1,15 +1,40 @@ - create("img/", array(300, 500)) // first 3s, then 5s for all the others + // Load all images from "./img/", in ascending order, + // apply the given delays, and save the result... + + $anim -> create("img/", array(30)) // first 3s, then 5s for all the others -> save("anim.gif"); + +} +else{ + print "Folder empty!"; +} ?>