public static function newFromArray(
        array $array,
        float $scale = 1.0,
        float $offset = 0.0
    ): Image {
        Utils::debugLog('newFromArray', [
            'instance' => null,
            'arguments' => [$array, $scale, $offset]
        ]);

        $result = vips_image_new_from_array($array, $scale, $offset);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

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

        return $result;
    }
public static function newFromArray(
        array $array,
        float $scale = 1.0,
        float $offset = 0.0
    ): Image {
        Utils::debugLog('newFromArray', [
            'instance' => null,
            'arguments' => [$array, $scale, $offset]
        ]);

        $result = vips_image_new_from_array($array, $scale, $offset);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

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

        return $result;
    }
public static function newFromArray ( array $ array , float $ scale = 1.0 , float $ offset = 0.0 ) : Image { Utils :: debugLog ( 'newFromArray' , [ 'instance' => null , 'arguments' => [ $ array , $ scale , $ offset ] ] ) ; $ result = vips_image_new_from_array ( $ array , $ scale , $ offset ) ; if ( $ result === - 1 ) { self :: errorVips ( ) ; } $ result = self :: wrapResult ( $ result ) ; Utils :: debugLog ( 'newFromArray' , [ 'result' => $ result ] ) ; return $ result ; }
Create a new Image from a php array.

2D arrays become 2D images. 1D arrays become 2D images with height 1.

@param array $array  The array to make the image from.
@param float $scale  The "scale" metadata item. Useful for integer
convolution masks.
@param float $offset The "offset" metadata item. Useful for integer
convolution masks.

@throws Exception

@return Image A new Image.
Create a new Image from a php array .