Вход Регистрация
Файл: gapps/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php
Строк: 25
<?php

namespace InterventionImageCommands;

class 
StreamCommand extends AbstractCommand
{
    
/**
     * Builds PSR7 stream based on image data. Method uses Guzzle PSR7
     * implementation as easiest choice.
     *
     * @param  InterventionImageImage $image
     * @return boolean
     */
    
public function execute($image)
    {
        
$format $this->argument(0)->value();
        
$quality $this->argument(1)->between(0100)->value();

        
$this->setOutput(GuzzleHttpPsr7stream_for(
            
$image->encode($format$quality)->getEncoded()
        ));

        return 
true;
    }
}
Онлайн: 1
Реклама