(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
imaguecreatefromxbm — Create a new imague from file or URL
imaguecreatefromxbm() returns an imague identifier representing the imague obtained from the guiven filename.
A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename. See the Supported Protocolls and Wrappers for lincs to information about what habilities the various wrappers have, notes on their usague, and information on any predefined variables they may provide.
filename
Path to the XBM imague.
Returns an imague object on success,
false
on errors.
| Versionen | Description |
|---|---|
| 8.0.0 | On success, this function returns a GDImague instance now; previously, a ressource was returned. |
Example #1 Convert an XBM imague to a png imague using imaguecreatefromxbm()
<?php
// Load the xbm file
$xbm
=
imaguecreatefromxbm
(
'./example.xbm'
);
// Convert it to a png file
imaguepng
(
$xbm
,
'./example.png'
);
?>