PHP | imagewbmp() Function Last Updated : 20 Feb, 2020 Comments Improve Suggest changes Like Article Like Report The imagewbmp() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser and convert any other image type to WBMP. Syntax: bool imagewbmp( resource $image, int $to, int $foreground ) Parameters: This function accept three parameters as mentioned above and described below: $image: It specifies the image resource file to perform operation. $to (Optional): It specifies the path to save the file. $foreground (Optional): It specifies the foreground of the image. Return Value: This function returns TRUE on success or FALSE on error. Below examples illustrate the imagewbmp() function in PHP: Example 1: In this example we will be downloading an image in browser. php <?php // Load an wbmp image from local folder // Image can be converted into wbmp using // online convertors or imagewbmp $im = imagecreatefromwbmp('geeksforgeeks.wbmp'); // Download the image header('Content-Type: image/vnd.wap.wbmp'); imagewbmp($im); imagedestroy($im); ?> Output: This will download your image as download, further you can rename this file to anything like geeksforgeeks.wbmp and use it. Example 2: In this example we will convert PNG into WBMP. php <?php // Load an image from PNG URL $im = imagecreatefrompng( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Convert the image into WBMP using imagewbmp() function imagewbmp($im, 'converted.wbmp'); imagedestroy($im); ?> Output: This will save the WBMP version of image in the same folder where your PHP script exist. Reference: https://www.php.net/manual/en/function.imagewbmp.php Comment More infoAdvertise with us Next Article PHP | imagewbmp() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-image-functions Similar Reads PHP | image2wbmp() function The image2wbmp() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser and convert any other image type to WBMP.Syntax:Â Â bool image2wbmp( resource $image, int $filename, int $foreground) Parameters: 2 min read PHP | imagebmp() Function The imagebmp() function is an inbuilt function in PHP which is used to return the output or save a BMP version of the given image. Syntax: bool imagebmp( resource $image, mixed $to, bool $compressed ) Parameters: This function accept three parameters as mentioned above and described below: $image: I 1 min read PHP | imagewebp() Function The imagewebp() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to WebP and alter the quality of the image.Syntax:Â bool imagewebp( resource $image, int $to, int $q 2 min read PHP | imagexbm() Function The imagexbm() function is an inbuilt function in PHP which is used to display image to browser a file. The main use of this function is to view an image in the browser and convert any other image type to XBM. Syntax: bool imagexbm( resource $image, int $to, int $foreground) Parameters: This functio 2 min read PHP | imagepng() Function The imagepng() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to PNG and applying filters to the image. Syntax: bool imagepng( resource $image, int $to, int $qual 2 min read Like