public static function newFromMemory(
        string $data,
        int $width,
        int $height,
        int $bands,
        string $format
    ): Image {
        Utils::debugLog('newFromMemory', [
            'instance' => null,
            'arguments' => [$data, $width, $height, $bands, $format]
        ]);

        $result = vips_image_new_from_memory($data, $width, $height, $bands, $format);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

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

        return $result;
    }
public static function newFromMemory(
        string $data,
        int $width,
        int $height,
        int $bands,
        string $format
    ): Image {
        Utils::debugLog('newFromMemory', [
            'instance' => null,
            'arguments' => [$data, $width, $height, $bands, $format]
        ]);

        $result = vips_image_new_from_memory($data, $width, $height, $bands, $format);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

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

        return $result;
    }
public static function newFromMemory ( string $ data , int $ width , int $ height , int $ bands , string $ format ) : Image { Utils :: debugLog ( 'newFromMemory' , [ 'instance' => null , 'arguments' => [ $ data , $ width , $ height , $ bands , $ format ] ] ) ; $ result = vips_image_new_from_memory ( $ data , $ width , $ height , $ bands , $ format ) ; if ( $ result === - 1 ) { self :: errorVips ( ) ; } $ result = self :: wrapResult ( $ result ) ; Utils :: debugLog ( 'newFromMemory' , [ 'result' => $ result ] ) ; return $ result ; }
Wraps an Image around an area of memory containing a C-style array.

@param string $data   C-style array.
@param int    $width  Image width in pixels.
@param int    $height Image height in pixels.
@param int    $bands  Number of bands.
@param string $format Band format. (@see BandFormat)

@throws Exception

@return Image A new Image.
Wraps an Image around an area of memory containing a C - style array .