This commit is contained in:
wangjinlei
2024-12-31 10:28:40 +08:00
parent 145b0ab8a5
commit a54a837670
1179 changed files with 2686 additions and 230376 deletions

View File

@@ -11,8 +11,7 @@
namespace think\image;
class Exception extends \RuntimeException
{
}
}

View File

@@ -11,7 +11,6 @@
namespace think\image\gif;
class Decoder
{
public $GIF_buffer = [];
@@ -204,4 +203,4 @@ class Decoder
{
return ($this->GIF_delays);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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());
}
}
}