Josegonzalez\Upload\Validation\Traits\ImageValidationTrait::isBelowMaxWidth PHP Method

isBelowMaxWidth() public static method

Check that the file is below the maximum width requirement
public static isBelowMaxWidth ( mixed $check, integer $width ) : boolean
$check mixed Value to check
$width integer Width of Image
return boolean Success
    public static function isBelowMaxWidth($check, $width)
    {
        // Non-file uploads also mean the height is too big
        if (!isset($check['tmp_name']) || !strlen($check['tmp_name'])) {
            return false;
        }
        list($imgWidth) = getimagesize($check['tmp_name']);
        return $width > 0 && $imgWidth <= $width;
    }