Check the image size.

@param  int  $size
164309
private function checkSize(&$size)
    {
        if ( ! NumberChecker::isIntValue($size)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size specified must be an integer.'
            );
        }

        $size = (int) $size;

        if ( ! NumberChecker::isIntBetween($size, 0, 512)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size must be within 0 pixels and 512 pixels.'
            );
        }
    }
61779
public function setSize($size) {
		foreach ( $this->elements as $element ) {
			$element->setSize($size);
		}
		if (is_int($size)) {
			return $this->addToPropertyUnique("class", CssRef::sizes("btn-group")[$size], CssRef::sizes("btn-group"));
		}
		return $this->addToPropertyCtrl("class", $size, CssRef::sizes("btn-group"));
	}
990811
public function tally($size)
	{
		$this->size = number_format($this->size + $size, 2, '.', '');
		$this->count++;
	}
1100342
public function multiply(Size $size): Size
    {
        $this->bit = $this->bit * $size->get('b');
        return $this;
    }
229141
public function setSize($size)
    {
        $this->getColumns()->each(function (ColumnInterface $column) use ($size) {
            $column->setSize($size);
        });
    }
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;
    }
790166
public function setSize($size)
    {
        if (!is_int($size)) {
            throw new \InvalidArgumentException('The attribute size on the class Attribute has to be integer (' . gettype($size) . ('object' === gettype($size) ? ' ' . get_class($size) : '') . ' given).');
        }

        $this->size = $size;

        return $this;
    }
811607
public function setSize($size): Input
    {
        if (empty((int) $size)) {
            Throw new FormException('A html form inputs size needs to be an integer.');
        }

        $this->attribute['size'] = $size;

        return $this;
    }
543644
public function addImageSize(ImageSize $size)
	{
		if ($this->imageSizes->containsKey($size->getName())) {
			return false;
		} else {
			$this->imageSizes->set($size->getName(), $size);
			return true;
		}
	}
1017838
public static function get_image_size( $size ) {
		// Check for a directly passed image configuration array.
		if ( is_array( $size ) ) {
			return $size;
		}

		$sizes = self::get_image_sizes();

		// Return found image size.
		if ( isset( $sizes[ $size ] ) ) {
			return $sizes[ $size ];
		}

		self::notice( "Image size \"{$size}\" does not exist in your image configuration." );

		return false;
	}
1095636
public function setCacheSize($size)
    {
        $this->cacheSize = $size;
        $this->logger->debug('LRUcache: set size: ' . $size );
        return true;
    }
118168
public static function getImageSize( string $size = 'thumbnail') {
		$sizes = self::getImageSizes();
		$size  = key_exists( $size, $sizes ) ? $size : 'thumbnail';

		return $sizes[ $size ];
	}
469268
public function fileSize($size) {
        if (!$size) {
            return '0 ' . $this->_sizes[0];
        }
        return round($size/pow(1024, ($i = floor(log($size, 1024)))), $i > 1 ? 2 : 0) .
            ' ' . $this->_sizes[$i];
    }
428429
public function checkSize($filesize)
    {
        if (is_string($filesize)) {
            $filesize = filesize($filesize);
        }
        return $filesize <= $this->allowedSize;
    }
1306744
public function setSize($size) {
		if (is_int($size)) {
			return $this->addToProperty("class", CssRef::sizes("btn-group")[$size]);
		}
		return $this->addToPropertyCtrl("class", $size, CssRef::sizes("btn-group"));
	}
375557
public function setAvatarSize($size)
    {
        $this->size = intval($size);
        if ($this->size > 512 || $this->size < 0) {
            throw new InvalidArgumentException('Avatar size must be within 0 pixels and 512 pixels');
        }
        return $this;
    }
92656
public static function get_image_height($size)
    {
        // Get the size meta array.
        $size = static::get_image_size($size);

        if ($size === false) {
            return false;
        }

        if (isset($size['height'])) {
            return (int) $size['height'];
        }

        return false;
    }