imagecreatefromxbm
PHP function
Edit on GitHub ✎
(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
New
Description
imagecreatefromxbm(string $filename): GdImage|false
imagecreatefromxbm() returns an image identifier representing the image obtained from the given filename.
Fopen-wrapper
Parameters
filenamePath to the XBM image.
Return Values
Identifier
Changelog
| Version | Description |
|---|---|
| 8.0.0 | On success, this function returns a GDImage instance now; previously, a resource was returned. |
Examples
Convert an XBM image to a png image using imagecreatefromxbm()
php
<?php
// Load the xbm file
$xbm = imagecreatefromxbm('./example.xbm');
// Convert it to a png file
imagepng($xbm, './example.png');
?>