public static function newFromFile(
        string $filename,
        array $options = []
    ): Image {
        Utils::debugLog('newFromFile', [
            'instance' => null,
            'arguments' => [$filename, $options]
        ]);

        $options = self::unwrap($options);
        $result = vips_image_new_from_file($filename, $options);
        self::errorIsArray($result);
        $result = self::wrapResult($result);

        Utils::debugLog('newFromFile', ['result' => $result]);

        return $result;
    }
public static function newFromFile(
        string $filename,
        array $options = []
    ): Image {
        Utils::debugLog('newFromFile', [
            'instance' => null,
            'arguments' => [$filename, $options]
        ]);

        $options = self::unwrap($options);
        $result = vips_image_new_from_file($filename, $options);
        self::errorIsArray($result);
        $result = self::wrapResult($result);

        Utils::debugLog('newFromFile', ['result' => $result]);

        return $result;
    }
public static function newFromFile ( string $ filename , array $ options = [ ] ) : Image { Utils :: debugLog ( 'newFromFile' , [ 'instance' => null , 'arguments' => [ $ filename , $ options ] ] ) ; $ options = self :: unwrap ( $ options ) ; $ result = vips_image_new_from_file ( $ filename , $ options ) ; self :: errorIsArray ( $ result ) ; $ result = self :: wrapResult ( $ result ) ; Utils :: debugLog ( 'newFromFile' , [ 'result' => $ result ] ) ; return $ result ; }
Create a new Image from a file on disc.

@param string $filename The file to open.
@param array  $options  Any options to pass on to the load operation.

@throws Exception

@return Image A new Image.
Create a new Image from a file on disc .