1
This commit is contained in:
@@ -11,8 +11,7 @@
|
||||
|
||||
namespace think\image;
|
||||
|
||||
|
||||
class Exception extends \RuntimeException
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace think\image\gif;
|
||||
|
||||
|
||||
class Decoder
|
||||
{
|
||||
public $GIF_buffer = [];
|
||||
@@ -204,4 +203,4 @@ class Decoder
|
||||
{
|
||||
return ($this->GIF_delays);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class Encoder
|
||||
for ($i = 0; $i < count($GIF_src); $i++) {
|
||||
if (strtolower($GIF_mod) == "url") {
|
||||
$this->BUF[] = fread(fopen($GIF_src[$i], "rb"), filesize($GIF_src[$i]));
|
||||
} else if (strtolower($GIF_mod) == "bin") {
|
||||
} elseif (strtolower($GIF_mod) == "bin") {
|
||||
$this->BUF[] = $GIF_src[$i];
|
||||
} else {
|
||||
printf("%s: %s ( %s )!", $this->VER, $this->ERR['ERR02'], $GIF_mod);
|
||||
@@ -74,7 +74,7 @@ class Encoder
|
||||
}
|
||||
$this->addHeader();
|
||||
for ($i = 0; $i < count($this->BUF); $i++) {
|
||||
$this->addFrames($i, $GIF_dly[$i]);
|
||||
isset($GIF_dly[$i]) && $this->addFrames($i, $GIF_dly[$i]);
|
||||
}
|
||||
$this->addFooter();
|
||||
}
|
||||
@@ -219,4 +219,4 @@ class Encoder
|
||||
{
|
||||
return ($this->GIF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,4 +85,4 @@ class Gif
|
||||
$gif = new Encoder($this->frames, $this->delays, 0, 2, 0, 0, 0, 'bin');
|
||||
file_put_contents($pathname, $gif->getAnimation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user