image2wbmp — Output images in WBMP format to a browser or file.
int image2wbmp ( resource $image [, string $filename [, int $threshold ]] )
image2wbmp() creates a WBMP file named filename from the image image. The image parameter is the return value of a function that creates an image, such as imagecreatetruecolor().
The filename parameter is optional. If omitted, the original image stream will be output directly.
<?php$file = 'php.jpg';$image = imagecreatefrompng($file);header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));image2wbmp($file); // Directly output the original image stream ?>