PHP image2wbmp - Output WBMP Images

PHP 图像处理PHP Image Processing

image2wbmp — Output an image to the browser or a file in WBMP format.

Syntax

int image2wbmp ( resource $image [, string $filename [, int $threshold ]] )

image2wbmp() creates a WBMP file named filename from the image. The image parameter is the return value of an image creation function, such as imagecreatetruecolor().

The filename parameter is optional; if omitted, the original image stream is output directly.

Examples

<?php
$file = 'php.jpg';
$image = imagecreatefrompng($file);
header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // 直接将原图像流输出
?>

PHP 图像处理PHP Image Processing

Other Extensions