Skip to content

Commit 6c07098

Browse files
committed
Add newInterpolator
See: libvips/php-vips-ext#6
1 parent 9546f75 commit 6c07098

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/Image.php

+15-2
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ public static function newFromFile(
705705
}
706706

707707
/**
708-
* Find the name of the load oepration vips will use to load a file, for
708+
* Find the name of the load operation vips will use to load a file, for
709709
* example "VipsForeignLoadJpegFile". You can use this to work out what
710710
* options to pass to newFromFile().
711711
*
@@ -757,7 +757,7 @@ public static function newFromBuffer(
757757
}
758758

759759
/**
760-
* Find the name of the load oepration vips will use to load a buffer, for
760+
* Find the name of the load operation vips will use to load a buffer, for
761761
* example 'VipsForeignLoadJpegBuffer'. You can use this to work out what
762762
* options to pass to newFromBuffer().
763763
*
@@ -813,6 +813,19 @@ public static function newFromArray(
813813
return self::wrapResult($result);
814814
}
815815

816+
/**
817+
* Make an interpolator from a name.
818+
*
819+
* @param string $name Name of the interpolator.
820+
*
821+
* @return resource|null The interpolator, or null on error.
822+
*/
823+
public static function newInterpolator(string $name)
824+
{
825+
// added in 1.0.7 of the binary module
826+
return vips_interpolate_new($name);
827+
}
828+
816829
/**
817830
* Create a new image from a constant.
818831
*

0 commit comments

Comments
 (0)