png2wbmp

(PHP 4 >= 4.0.5, PHP 5, PHP 7)

png2wbmp — Convierte una imagen PNG en imagen WBMP

Advertencia

Esta función está OBSOLETA a partir de PHP 7.2.0, y ha sido ELIMINADA a partir de PHP 8.0.0. Depender de esta función está altamente desaconsejado.

Descripción

function png2wbmp(
    string $pngname,
    string $wbmpname,
    int $dest_height,
    int $dest_width,
    int $threshold
): bool

Convierte una imagen PNG en imagen WBMP.

Parámetros

pngname

Ruta al fichero PNG.

wbmpname

Ruta al fichero final WBMP.

dest_height

Altura de la imagen de destino.

dest_width

Ancho de la imagen de destino.

threshold

Valor del umbral, entre 0 y 8 inclusive.

Valores devueltos

Esta función retorna true en caso de éxito o false si ocurre un error.

Precaución

Sin embargo, si libgd no logra producir la imagen, esta función devuelve true.

Ejemplos

Ejemplo #1 Ejemplo con png2wbmp()

<?php
// Ruta a la imagen PNG
$path = './test.png';

// Obtención del tamaño de la imagen
$image = getimagesize($path);

// Conversión de la imagen
png2wbmp($path, './test.wbmp', $image[1], $image[0], 7);
?>

Véase también

  • jpeg2wbmp() - Convierte una imagen JPEG en imagen WBMP

User Contributed Notes 1 note

up
0
Window Bump Map
18 years ago
WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top