Вход Регистрация
Файл: vendor/intervention/gif/src/Decoders/ColorTableDecoder.php
Строк: 29
<?php

declare(strict_types=1);

namespace 
InterventionGifDecoders;

use 
InterventionGifBlocksColor;
use 
InterventionGifBlocksColorTable;
use 
InterventionGifExceptionsDecoderException;

class 
ColorTableDecoder extends AbstractDecoder
{
    
/**
     * Decode given string to ColorTable.
     *
     * @throws DecoderException
     */
    
public function decode(): ColorTable
    
{
        
$table = new ColorTable();
        
$length $this->length() !== null $this->length() : 0;

        for (
$i 0$i < ($length 3); $i++) {
            
$table->addColor(Color::decode($this->stream));
        }

        return 
$table;
    }
}
Онлайн: 0
Реклама