English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
image2wbmp — Outputs images in WBMP format to the browser or file.
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 created image function, such as imagecreatetruecolor().
The filename parameter is optional. If omitted, the original image stream is 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 ?>