PHP 8.6.0 Beta 1 is available for testing

jpeg2wbmp

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

jpeg2wbmpConvierte una imagen JPEG en imagen WBMP

Advertencia

Esta funcionalidad está OBSOLETA a partir de PHP 7.2.0 y ha sido ELIMINADA a partir de PHP 8.0.0.

Descripción

function jpeg2wbmp(
string $jpegname,
string $wbmpname,
int $dest_height,
int $dest_width,
int $threshold
): bool

Convierte una imagen JPEG en imagen WBMP.

Parámetros

jpegname

Ruta hacia el fichero JPEG.

wbmpname

Ruta hacia el 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 jpeg2wbmp()

<?php
// Ruta hacia el objetivo jpeg
$path = './test.jpg';
// Obtención del tamaño de la imagen
$image = getimagesize($path);
// Conversión de la imagen
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?>

Véase también

  • png2wbmp() - Convierte una imagen PNG en imagen WBMP

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /