Graphics

png2wbmp() and jpegwbmp()

The WBMP (Wireless Application Protocol Bitmap Format) is a pretty outdated file format for black-and-white images. It had been introduced to save on bandwidth when transferring images over mobile network connections. Well, that was clearly before YouTube and Netflix.

The gd extension offers functions to work with WBMP images. As of PHP 7.2, the two functions png2wbmp() and jpeg2wbmp() have been deprecated. They will be removed in PHP 8. In case you still need to create WBMP images with PHP, you can substitute the deprecated functions. Use imagecreatefrompng(), or imagecreatefromjpeg() respectively, to create an image, then call imagewbmp() to create a WBMP bitmap.

In addition, the function image2wbmp() has been deprecated in PHP 7.3.