PHP | imagecreatefromxbm() function Last Updated : 30 Jan, 2020 Comments Improve Suggest changes Like Article Like Report The imagecreatefromxbm() function is an inbuilt function in PHP which is used to create a new image from XBM file or URL. XBM file extension is an X Bitmap Graphics file used for Graphical UI systems. This loaded image can be further worked upon in the program. This function is usually used when you want to edit your images after loading them from an XBM file. An image can be converted into XBM using imagexbm() function. Syntax: resource imagecreatefromxbm( string $filename ) Parameters:This function accepts a single parameter $filename which holds the name of image. Return Value: This function returns an image resource identifier on success, FALSE on errors. Below given programs illustrate the imagecreatefromxbm() function in PHP: Program 1: php <?php // Load an XBM image from local folder // You can convert any image to XBM using // imagexbm() function or online convertors $im = imagecreatefromxbm('./geeksforgeeks.xbm'); // View the loaded image in browser imagexbm($im); imagedestroy($im); ?> Output: This will load the content into browser in the form of unsupported text as browsers don't support XBM. Program 2: php <?php // Load an XBM image from local folder // You can convert any image to XBM using // imagexbm() function or online convertors $im = imagecreatefromxbm('./geeksforgeeks.xbm'); // Output the image by converting it into PNG header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?> Output: Reference: https://www.php.net/manual/en/function.imagecreatefromxbm.php Comment More infoAdvertise with us Next Article PHP | imagecreatefromxbm() function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function Similar Reads PHP | imagecreatefromxpm() Function The imagecreatefromxpm() function is an inbuilt function in PHP which is used to create a new image from XPM file or URL. XPM (X PixMap) is an image file format used by the X Window System. This loaded image can be further worked upon in the program. This function is usually used when you want to ed 2 min read PHP | imagecreatefrombmp() Function The imagecreatefrombmp() function is an inbuilt function in PHP which is used to create a new image from file or URL. Syntax: resource imagecreatefrombmp( string $filename ) Parameters: This function accepts a single parameter $filename which holds the name or URL of a file. Return Value: This funct 1 min read PHP | imagecreatefromwbmp() Function The imagecreatefromwbmp() function is an inbuilt function in PHP which is used to create a new image from WBMP file or URL. WBMP (Wireless Application Protocol Bitmap Format) is a monochrome graphics file format optimized for mobile computing devices. This loaded image can be further worked upon in 2 min read PHP | imagecreatefromwebp() function The imagecreatefromwebp() function is an inbuilt function in PHP which is used to create a new image from WEBP file or URL. WEBP is an image format employing both lossy and lossless compression. This image can be further worked upon in the program. This function is usually used when you want to edit 2 min read PHP | imagecreatefromgd() function The imagecreatefromgd() function is an inbuilt function in PHP which is used to create a new image from GD file or URL. Further, this image can be worked upon in the program. An image can be converted into GD format using the imagegd() function. Syntax: resource imagecreatefromgd( string $filename ) 2 min read PHP | imagecreatefrompng() Function The imagecreatefrompng() function is an inbuilt function in PHP which is used to create a new image from PNG file or URL. This image can be further worked upon in the program. This function is usually used when you want to edit your PNG images. Syntax: resource imagecreatefrompng( string $filename ) 1 min read PHP | imagecreatefromgd2() function The imagecreatefromgd2() function is an inbuilt function in PHP which is used to create a new image from file or URL. Further, this image can be worked upon in the program. Usually, gd2 extension is not supported in the browser thus it can be used to convert it into png and view it in the browser.Sy 1 min read PHP | imagecreatefromgif() Function The imagecreatefromgif() function is an inbuilt function in PHP which is used to create a new image from a given part of GIF file or URL. Further, this image can be worked upon in the program. This function only loads the first frame of the animation. Syntax: resource imagecreatefromgif( string $fil 1 min read PHP | imagecreatefromjpeg() Function The imagecreatefromjpeg() function is an inbuilt function in PHP which is used to create a new image from JPEG file or URL. This image can be further worked upon in the program. Syntax: resource imagecreatefromjpeg( string $filename ) Parameters: This function accepts a single parameter, $filename w 1 min read PHP | imagecreate() Function The imagecreate() function is an inbuilt function in PHP which is used to create a new image. This function returns the blank image of given size. In general imagecreatetruecolor() function is used instead of imagecreate() function because imagecreatetruecolor() function creates high quality images. 2 min read Like