Easy Tutorial
❮ Func Curl_Getinfo Func Error Debug Backtrace ❯

PHP image2wbmp - Output WBMP Image

PHP Image Processing

image2wbmp — Outputs 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 a function that creates an image, such as imagecreatetruecolor().

The filename parameter is optional. If omitted, the raw image stream is output directly.

Example

<?php
$file = 'php.jpg';
$image = imagecreatefrompng($file);
header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // Outputs the raw image stream directly
?>

PHP Image Processing

❮ Func Curl_Getinfo Func Error Debug Backtrace ❯