English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
image2wbmp — Outputs the image to the browser or file in WBMP format.
int image2wbmp ( resource $image [, string $filename [, int $threshold ] ] )
image2wbmp() creates a WBMP file named filename from an 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 ?>