extent

@param mixed $width
@param mixed $height
@param mixed $flag
@access protected
@return mixed
766611
protected function extent($width, $height, $flag = null)
    {
        $w = $this->getInfo('width');
        $h = $this->getInfo('height');

        extract(
            $this->getCropCoordinates(
                $nw = imagesx($this->resource),
                $nh = imagesy($this->resource),
                $width,
                $height,
                $this->getGravity()
            )
        );

        $extent = imagecreatetruecolor($width, $height);

        imagecopy($extent, $this->resource, 0, 0, $x, $y, $width, $height);
        $this->swapResource($extent);

        return $this;
    }
501575
public function resize(int $width = 0, int $height = 0)
    {
        $this->instance->scaleImage($width, $height);
    }
548663
public function cropAndResizeFromEdge($width, $height, $edge)
        {
            $this->resizeOut($width, $height);
            $this->cropFromEdge($width, $height, $edge);

            return $this;
        }
825914
public function getImageResized($width = null, $height = null, $method = null)
    {
        if ($this->hasImage()) {
            
            $image = $this->getSlideImage();
            
            if ($width || $height || $method) {
                return ImageTools::singleton()->resize($image, $width, $height, $method);
            }
            
            if ($this->getParent()->hasMethod('performImageResize')) {
                return $this->getParent()->performImageResize($image);
            }
            
            return $image;
            
        }
    }
165344
public static function getInstanceByCreate($width, $height)
    {
        $instance = new self();

        // set image dimensions
        $instance->width = (int)$width;
        $instance->height = (int)$height;

        $instance->createImage();

        return $instance;
    }
442982
public function ThumbnailURL($width, $height)
    {
        $object = $this->getObjectLatestVersion();
        if ($object instanceof Thumbnail) {
            return $object->ThumbnailURL($width, $height);
        }
        return null;
    }
449110
public function setViewportSize($width, $height)
    {
        $this->viewportWidth  = (int) $width;
        $this->viewportHeight = (int) $height;

        return $this;
    }
84479
public function pad($width, $height, $color = array(255, 255, 255))
    {
        // no resize - woohoo!
        if ($width == $this->currentDimensions['width'] && $height == $this->currentDimensions['height']) {
            return $this;
        }

        // create the working image
        if (function_exists('imagecreatetruecolor')) {
            $this->workingImage = imagecreatetruecolor($width, $height);
        } else {
            $this->workingImage = imagecreate($width, $height);
        }

        // create the fill color
        $fillColor = imagecolorallocate($this->workingImage, $color[0], $color[1], $color[2]);

        // fill our working image with the fill color
        imagefill($this->workingImage, 0, 0, $fillColor);

        // copy the image into the center of our working image
        imagecopyresampled($this->workingImage, $this->oldImage, intval(($width - $this->currentDimensions['width']) / 2), intval(($height - $this->currentDimensions['height']) / 2), 0, 0, $this->currentDimensions['width'], $this->currentDimensions['height'], $this->currentDimensions['width'], $this->currentDimensions['height']);

        // update all the variables and resources to be correct
        $this->oldImage = $this->workingImage;
        $this->currentDimensions['width'] = $width;
        $this->currentDimensions['height'] = $height;

        return $this;
    }
817385
protected function resize($width, $height, $flag = '')
    {
        $min = min($width, $height);
        $cmd = '-resize %sx%s%s';

        switch ($flag) {
            case static::FL_OSRK_LGR:
                break;
            case static::FL_RESZ_PERC:
                $cmd = '-resize %s%s%s';
                break;
            case static::FL_IGNR_ASPR:
            default:
                // compensating some imagick /im differences:
                if (0 === $width) {
                    $width = (int)floor($height * $this->getInfo('ratio'));
                }
                if (0 === $height) {
                    $height = (int)floor($width / $this->getInfo('ratio'));
                }
                $h = '';
                break;
        }

        $w = $this->getValueString($width);
        $h = $this->getValueString($height);

        $this->commands[$cmd] = [$w, $h, $flag];
        return $this;
    }
1057845
public function resize($width, $height)
    {
        return $this->createCloneWithResource(
            function (InterventionImage $resource) use ($width, $height) {
                return $resource->resize($width, $height);
            }
        );
    }
790985
public function setSize($width, $height)
    {
        $params = [
            'width' => intval($width),
            'height' => intval($height)
        ];
        $command = $this->driver->factoryCommand(
            'window/' . $this->windowHandle . '/size',
            WebDriver_Command::METHOD_POST,
            $params
        );
        return $this->driver->curl($command)['value'];
    }
895159
protected function getImageSize($width, $height)
    {
        $min = min($width, $height);

        // if one value is zero, we have to calculate the right
        // value using the image aspect raion
        if (0 === $min) {

            // if both hight and widh are zero we assume
            // that the image is not resized at all
            if (0 === max($width, $height)) {
                extract($this->getInfo());
            } else {
                $ratio = $this->getInfo('ratio');
            }

            $width  = $width  === 0 ? (int) floor($height * $ratio) : $width;
            $height = $height === 0 ? (int) floor($width  / $ratio) : $height;
        }

        return compact('width', 'height');
    }
684502
public function applyDpr($width, $height, $dpr)
    {
        $width = $width * $dpr;
        $height = $height * $dpr;

        return [
            (int) $width,
            (int) $height,
        ];
    }
111727
public function defineSize($width, $height, $ratio = null)
    {
        $ratio = !is_null($ratio) ? $ratio : $this->ratio;

        if ($this->ratio == self::RATIO_HEIGHT)
            return $this->resizeRect($this->sourceWidth, $this->sourceHeight, $width, $height, 'height');
        elseif ($this->ratio == self::RATIO_WIDTH)
            return $this->resizeRect($this->sourceWidth, $this->sourceHeight, $width, $height);
        else
            return array('width' => $width, 'height' => $height);
    }
980935
public function resize_max( $width, $height ) 
	{
		$new_width = $this->width;
		$new_height = $this->height;

		if ( $new_width > $width ) 
		{
			// set new with
			$new_width = $width;
			// calculate height
			$new_height = $new_width * ( $this->height / $this->width );
		}

		if ( $new_height > $height ) 
		{
			// set new height
			$new_height = $height;
			// calculate width
			$new_width = $new_height * ( $this->width / $this->height );
		}

		return $this->resize_strict( $new_width, $new_height );
	}
814618
private function simpleCrop($width, $height) {
        $sourceRatio = $this->image->getWidth() / $this->image->getHeight();
        $cropRatio = $width / $height;

        $params = [];

        if ($cropRatio > $sourceRatio) {
            $params['width'] = $width;
        } else {
            $params['height'] = $height;
        }

        $transformationManager = $this->event->getTransformationManager();

        $maxSize = $transformationManager->getTransformation('maxSize');
        $maxSize->setImage($this->image)->transform($params);

        $crop = $transformationManager->getTransformation('crop');
        $crop->setImage($this->image)->transform([
            'width' => $width,
            'height' => $height,
            'mode' => 'center'
        ]);
    }
419610
protected function do_resize(\stdClass $src, $width, $height) {

		$src->resource->resizeImage($width, $height, \Imagick::FILTER_CATROM, 1, FALSE);
		$src->resource->convolveImage([-1, -0.8, -1, -0.8, 16, -0.8, -1, -0.8, -1]);
		
		$src->width		= $width;
		$src->height	= $height;

		return $src;
		
	}