Файл: vendor/intervention/gif/src/Decoders/ColorTableDecoder.php
Строк: 27
<?php
declare(strict_types=1);
namespace InterventionGifDecoders;
use InterventionGifBlocksColor;
use InterventionGifBlocksColorTable;
use InterventionGifExceptionsDecoderException;
class ColorTableDecoder extends AbstractDecoder
{
/**
* Decode given string to ColorTable
*
* @throws DecoderException
* @return ColorTable
*/
public function decode(): ColorTable
{
$table = new ColorTable();
for ($i = 0; $i < ($this->getLength() / 3); $i++) {
$table->addColor(Color::decode($this->handle));
}
return $table;
}
}