@@ -809,30 +809,6 @@ function imagecreatefrompng(string $filename)
809
809
}
810
810
811
811
812
- /**
813
- * imagecreatefromstring returns an image identifier
814
- * representing the image obtained from the given image.
815
- * These types will be automatically detected if your build of PHP supports
816
- * them: JPEG, PNG, GIF, BMP, WBMP, and GD2.
817
- *
818
- * @param string $image A string containing the image data.
819
- * @return resource An image resource will be returned on success. FALSE is returned if
820
- * the image type is unsupported, the data is not in a recognised format,
821
- * or the image is corrupt and cannot be loaded.
822
- * @throws ImageException
823
- *
824
- */
825
- function imagecreatefromstring (string $ image )
826
- {
827
- error_clear_last ();
828
- $ result = \imagecreatefromstring ($ image );
829
- if ($ result === false ) {
830
- throw ImageException::createFromPhpError ();
831
- }
832
- return $ result ;
833
- }
834
-
835
-
836
812
/**
837
813
* imagecreatefromwbmp returns an image identifier
838
814
* representing the image obtained from the given filename.
@@ -1891,92 +1867,6 @@ function imagepolygon($image, array $points, int $num_points, int $color): void
1891
1867
}
1892
1868
1893
1869
1894
- /**
1895
- * Loads a character encoding vector from a file and changes the fonts
1896
- * encoding vector to it. As a PostScript fonts default vector lacks most of
1897
- * the character positions above 127, you'll definitely want to change this
1898
- * if you use a language other than English.
1899
- *
1900
- * If you find yourself using this function all the time, a much
1901
- * better way to define the encoding is to set ps.default_encoding in
1902
- * the configuration file
1903
- * to point to the right encoding file and all fonts you load will
1904
- * automatically have the right encoding.
1905
- *
1906
- * @param resource $font_index A font resource, returned by imagepsloadfont.
1907
- * @param string $encodingfile The exact format of this file is described in T1libs documentation.
1908
- * T1lib comes with two ready-to-use files,
1909
- * IsoLatin1.enc and
1910
- * IsoLatin2.enc.
1911
- * @throws ImageException
1912
- *
1913
- */
1914
- function imagepsencodefont ($ font_index , string $ encodingfile ): void
1915
- {
1916
- error_clear_last ();
1917
- $ result = \imagepsencodefont ($ font_index , $ encodingfile );
1918
- if ($ result === false ) {
1919
- throw ImageException::createFromPhpError ();
1920
- }
1921
- }
1922
-
1923
-
1924
- /**
1925
- * Extend or condense a font (font_index), if
1926
- * the value of the extend parameter is less
1927
- * than one you will be condensing the font.
1928
- *
1929
- * @param resource $font_index A font resource, returned by imagepsloadfont.
1930
- * @param float $extend Extension value, must be greater than 0.
1931
- * @throws ImageException
1932
- *
1933
- */
1934
- function imagepsextendfont ($ font_index , float $ extend ): void
1935
- {
1936
- error_clear_last ();
1937
- $ result = \imagepsextendfont ($ font_index , $ extend );
1938
- if ($ result === false ) {
1939
- throw ImageException::createFromPhpError ();
1940
- }
1941
- }
1942
-
1943
-
1944
- /**
1945
- * imagepsfreefont frees memory used by a PostScript
1946
- * Type 1 font.
1947
- *
1948
- * @param resource $font_index A font resource, returned by imagepsloadfont.
1949
- * @throws ImageException
1950
- *
1951
- */
1952
- function imagepsfreefont ($ font_index ): void
1953
- {
1954
- error_clear_last ();
1955
- $ result = \imagepsfreefont ($ font_index );
1956
- if ($ result === false ) {
1957
- throw ImageException::createFromPhpError ();
1958
- }
1959
- }
1960
-
1961
-
1962
- /**
1963
- * Slant a given font.
1964
- *
1965
- * @param resource $font_index A font resource, returned by imagepsloadfont.
1966
- * @param float $slant Slant level.
1967
- * @throws ImageException
1968
- *
1969
- */
1970
- function imagepsslantfont ($ font_index , float $ slant ): void
1971
- {
1972
- error_clear_last ();
1973
- $ result = \imagepsslantfont ($ font_index , $ slant );
1974
- if ($ result === false ) {
1975
- throw ImageException::createFromPhpError ();
1976
- }
1977
- }
1978
-
1979
-
1980
1870
/**
1981
1871
* imagerectangle creates a rectangle starting at
1982
1872
* the specified coordinates.
@@ -2705,7 +2595,7 @@ function imagewebp($image, $to = null, int $quality = 80): void
2705
2595
*
2706
2596
* @param resource $image An image resource, returned by one of the image creation functions,
2707
2597
* such as imagecreatetruecolor.
2708
- * @param string|null $filename The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.
2598
+ * @param string|null $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly.
2709
2599
*
2710
2600
* The filename (without the .xbm extension) is also
2711
2601
* used for the C identifiers of the XBM, whereby non
@@ -2719,7 +2609,7 @@ function imagewebp($image, $to = null, int $quality = 80): void
2719
2609
* @throws ImageException
2720
2610
*
2721
2611
*/
2722
- function imagexbm ($ image , ?string $ filename = null , int $ foreground = null ): void
2612
+ function imagexbm ($ image , ?string $ filename , int $ foreground = null ): void
2723
2613
{
2724
2614
error_clear_last ();
2725
2615
if ($ foreground !== null ) {
0 commit comments