src/Manipulators/Size.php
public function run(Image $image)
    {
        $width = $this->getWidth();
        $height = $this->getHeight();
        $fit = $this->getFit();
        $dpr = $this->getDpr();

        list($width, $height) = $this->resolveMissingDimensions($image, $width, $height);
        list($width, $height) = $this->applyDpr($width, $height, $dpr);
        list($width, $height) = $this->limitImageSize($width, $height);

        if ((int) $width !== (int) $image->width() or (int) $height !== (int) $image->height()) {
            $image = $this->runResize($image, $fit, (int) $width, (int) $height);
        }

        return $image;
    }
public function run(Image $image)
    {
        $width = $this->getWidth();
        $height = $this->getHeight();
        $fit = $this->getFit();
        $dpr = $this->getDpr();

        list($width, $height) = $this->resolveMissingDimensions($image, $width, $height);
        list($width, $height) = $this->applyDpr($width, $height, $dpr);
        list($width, $height) = $this->limitImageSize($width, $height);

        if ((int) $width !== (int) $image->width() or (int) $height !== (int) $image->height()) {
            $image = $this->runResize($image, $fit, (int) $width, (int) $height);
        }

        return $image;
    }
public function run ( Image $ image ) { $ width = $ this -> getWidth ( ) ; $ height = $ this -> getHeight ( ) ; $ fit = $ this -> getFit ( ) ; $ dpr = $ this -> getDpr ( ) ; list ( $ width , $ height ) = $ this -> resolveMissingDimensions ( $ image , $ width , $ height ) ; list ( $ width , $ height ) = $ this -> applyDpr ( $ width , $ height , $ dpr ) ; list ( $ width , $ height ) = $ this -> limitImageSize ( $ width , $ height ) ; if ( ( int ) $ width !== ( int ) $ image -> width ( ) or ( int ) $ height !== ( int ) $ image -> height ( ) ) { $ image = $ this -> runResize ( $ image , $ fit , ( int ) $ width , ( int ) $ height ) ; } return $ image ; }
Perform size image manipulation.
@param  Image $image The source image.
@return Image The manipulated image.
Perform size image manipulation .