imagecreatefromxbm
(PHP 4 >= 4.0.1, PHP 5)
imagecreatefromxbm — Create a new image from file or URL
Opis
imagecreatefromxbm() returns an image identifier representing the image obtained from the given filename.
Jeśli włączona jest dyrektywa konfiguracyjna fopen wrappers, możliwe jest podanie jako nazwy pliku adresu URL. Zobacz opis funkcji fopen() aby dowiedzieć się jak przekazać nazwę pliku, oraz fopen wrappers aby uzyskać listę obsługiwanych protokołów.
Parametry
- filename
-
Path to the XBM image.
Zwracane wartości
Returns an image resource identifier on success, FALSE on errors.
Przykłady
Przykład #1 Convert an XBM image to a png image using imagecreatefromxbm()
<?php
// Load the xbm file
$xbm = imagecreatefromxbm('./example.xbm');
// Convert it to a png file
imagepng($xbm, './example.png');
imagedestroy($xbm);
?>
Notatki
PHP w wersji starszej niż 4.3.0, pracujące pod kontrolą systemów Windows, nie obsługują dostępu do zdalnych plików w tej funkcji, nawet jeśli opcja allow_url_fopen jest włączona.
imagecreatefromxbm
