File "GetSizeCommand.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php
File size: 589 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Intervention\Image\Imagick\Commands;
use Intervention\Image\Commands\AbstractCommand;
use Intervention\Image\Size;
class GetSizeCommand extends AbstractCommand
{
/**
* Reads size of given image instance in pixels
*
* @param \Intervention\Image\Image $image
* @return boolean
*/
public function execute($image)
{
/** @var \Imagick $core */
$core = $image->getCore();
$this->setOutput(new Size(
$core->getImageWidth(),
$core->getImageHeight()
));
return true;
}
}