Set size of image.

@param $size size of image.

@since 3.0.0

@return int
501431
public function setSize($size)
    {
        if (!empty($size)) {
            $this->size = $size;
            $this->pxRatio = round($size / 5);

            return $this;
        }
    }
254837
private function setSize($size): void
    {
        if (false === is_int($size)) {
            throw new \InvalidArgumentException('Upload file size must be an integer');
        }

        $this->size = $size;
    }
331809
public function getImage($size = null)
    {
        assert('$this->image');
        if ($size === null) {
            $size = $this->maxSize;
        }
        $icon = imagecreatetruecolor($size, $size);
        $srcSize = $this->tileSize * $this->tiles;
        imagecopyresampled($icon, $this->image, 0, 0, 0, 0, $size, $size, $srcSize, $srcSize);
        return $icon;
    }
1373668
public function setSize($size)
	{
		$this->size = $size;
		$this->pixelRatio = round($size / 5);

		return $this;
	}
1025250
public function median(int $size): Image
    {
        return $this->rank($size, $size, ($size * $size) / 2);
    }
825403
public function setSize($width = null, $height = null) 
	{
		if(null === $height && null !== $width) {
			if($width > $this->imageInfo['width']) {
				$width = $this->imageInfo['width'];
			}
			// $width : $this->imageInfo['width'] = $height : $this->imageInfo['height']
			$height = (int) ($width * $this->imageInfo['height'] / $this->imageInfo['width']);
		}
		
		if(null === $width && null !== $height) {
			if($height > $this->imageInfo['height']) {
				$height = $this->imageInfo['height'];
			}
			// $width : $this->imageInfo['width'] = $height : $this->imageInfo['height']
			$width = (int) ($height * $this->imageInfo['width'] / $this->imageInfo['height']);
		}
	
		$this->width = $width;
		$this->height = $height;
		
		return $this;
	}
360854
public function setSize(WebDriverDimension $size)
    {
        $params = [
            'width' => $size->getWidth(),
            'height' => $size->getHeight(),
            ':windowHandle' => 'current',
        ];
        $this->executor->execute(DriverCommand::SET_WINDOW_SIZE, $params);

        return $this;
    }
206968
public function fileSize($size) {
        $this->p1 = $size;
        $this->check_role = 'fileSize';
        if ($this->value instanceof File) {
            $result = filesize($this->value->path_tmp) <= $this->strToSize($size) ;
        } else {
            $result = filesize($this->value) <= $this->strToSize($size) ;
        }
        $this->checkResult($result);
        return $this;
    }
136573
public function setFontSize(int $size): PdfInterface
    {
        $this->fontSize = (int) $size;
        $this->mpdf->SetDefaultFontSize($this->fontSize);

        return $this;
    }
47058
private function _getImageToSize(array $images, int $size)
	{
		$selectedImage = null;
		$selectedSize = 0;

		foreach ($images as $image)
		{
			if (is_array($image))
			{
				$imageWidth = isset($image['width']) && is_numeric($image['width']) ? $image['width'] : 0;
				$imageHeight = isset($image['height']) && is_numeric($image['height']) ? $image['height'] : 0;
				$imageSize = max($imageWidth, $imageHeight);

				if (!$selectedImage ||
					($selectedSize < $size && $imageSize > $selectedSize) ||
					($selectedSize > $imageSize && $imageSize > $size))
				{
					$selectedImage = $image;
					$selectedSize = $imageSize;
				}
			}
		}

		return $selectedImage;
	}
884833
function getsize($size) {
        if ($size === null) return null;
        $last = strtolower($size{strlen($size)-1});
        $size = (int) $size;
        switch($last) {
            case 'g':
                $size *= 1024;
            case 'm':
                $size *= 1024;
            case 'k':
                $size *= 1024;
        }
        return $size;
    }
229141
public function setSize($size)
    {
        $this->getColumns()->each(function (ColumnInterface $column) use ($size) {
            $column->setSize($size);
        });
    }
969356
private function setImageSize($image, $size, $needExactSize = false)
    {
        if (empty($size)) {
            return $image;
        }

        if ($needExactSize || $image->getImageWidth() > $size[0]) {
            if ($size[0] == 0 || $size[1] == 0) {
                $image->scaleImage($size[0], $size[1]);
            } else {
                $image->cropThumbnailImage($size[0], $size[1]);
            }
        }

        return $image;
    }
934746
private function calculateSizeOfRemainingLengthField(int $size): int
    {
        $blockSize = $iterations = 0;
        while ($size >= $blockSize) {
            $iterations++;
            $blockSize = 128 ** $iterations;
        }

        $this->sizeOfRemainingLengthField = $iterations;
        return $iterations;
    }
844585
public static function size(string $name, int $size = 12)
    {
        $instance = new static();

        $instance->group['name'] = $name;
        $instance->group['size'] = $size;

        return $instance;
    }
1302524
public function setBlockSize($size)
    {
        if ($size <= 1) {
            throw new \InvalidArgumentException("Pixel Size Must Be Greater Than One");
        }
        $this->size = (int) abs($size);

        return $this;
    }
178386
public function setSize(int $size) : self
    {
        $this->getField()->addAttribute('size', (string) $size);

        return $this;
    }