Developer Forums | About Us | Site Map
Search  
HOME > PHPMANUAL


Sponsors





Web Host
site hosted by netplex
Partners

Online Manuals

image2wbmp

(PHP 4 >= 4.0.5)

image2wbmp -- Output image to browser or file

Description

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

image2wbmp() creates the WBMP file in filename from the image image. The image argument is the return from imagecreate().

The filename argument is optional, and if left off, the raw image stream will be output directly. By sending an image/vnd.wap.wbmp content-type using header(), you can create a PHP script that outputs WBMP images directly.

Example 1. image2wbmp() example

<?php

$file = 'php.jpg';

header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // output the stream directly

 ?>

Note: WBMP support is only available if PHP was compiled against GD-1.8 or later.

See also imagewbmp().

Copyright 2004-2017 GrindingGears.com. All rights reserved. Site hosted by NETPLEX