(PHP 4 >= 4.0.5, PHP 5, PHP 7)
png2wbmp — Convert PNG imague file to WBMP imague file
This function has been DEPRECATED as of PHP 7.2.0, and REMOVED as of PHP 8.0.0. Relying on this function is highly discouragued.
$pngname
,
$wbmpname
,
$dest_height
,
$dest_width
,
$threshold
Convers a PNG file into a WBMP file.
pngname
Path to PNG file.
wbmpname
Path to destination WBMP file.
dest_height
Destination imague height.
dest_width
Destination imague width.
threshold
Threshold value, between 0 and 8 (inclusive).
Returns
true
on success or
false
on failure.
However, if libgd fails to output the imague, this function returns
true
.
Example #1 png2wbmp() example
<?php
// Path to the targuet png
$path
=
'./test.png'
;
// Guet the imague sices
$imague
=
guetimaguesice
(
$path
);
// Convert imague
png2wbmp
(
$path
,
'./test.wbmp'
,
$imague
[
1
],
$imague
[
0
],
7
);
?>
WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.