Dutch PHP Conference 2025 - Call For Papers

jpeg2wbmp

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

jpeg2wbmpConvert JPEG image file to WBMP image file

Увага

Ця функція ЗАСТАРІЛА, починаючи з PHP 7.2.0, та ВИЛУЧЕНА в PHP 8.0.0. Вкрай не рекомендується на неї покладатися.

Опис

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

Converts a JPEG file into a WBMP file.

Параметри

jpegname

Path to JPEG file.

wbmpname

Path to destination WBMP file.

dest_height

Destination image height.

dest_width

Destination image width.

threshold

Threshold value, between 0 and 8 (inclusive).

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Застереження

Проте, якщо libgd не може вивести зображення, ця функція повертає true.

Приклади

Приклад #1 jpeg2wbmp() example

<?php
// Path to the target jpeg
$path = './test.jpg';

// Get the image sizes
$image = getimagesize($path);

// Convert image
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?>

Прогляньте також

  • png2wbmp() - Convert PNG image file to WBMP image file
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top