首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

jpeg2wbmp

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

jpeg2wbmp - 将JPEG图像文件转换为WBMP图像文件

警告

从PHP 7.2.0开始,jpeg2wbmp()已被弃用,并且自PHP 8.0.0起将被删除。改为使用imagecreatefromjpeg()和imagewbmp()。

描述

代码语言:javascript
复制
bool jpeg2wbmp ( string $jpegname , string $wbmpname , int $dest_height , int $dest_width , int $threshold )

将JPEG文件转换为WBMP文件。

参数

jpegname

JPEG文件的路径。

wbmpname

目标WBMP文件的路径。

dest_height

目标图片高度。

dest_width

目的地图像宽度。

threshold

阈值,介于0和8(含)之间。

返回值

成功返回TRUE或失败时返回FALSE。

例子

示例#1 jpeg2wbmp()示例

代码语言:javascript
复制
<?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() - 将PNG图像文件转换为WBMP图像文件

← iptcparse

png2wbmp →

扫码关注腾讯云开发者

领取腾讯云代金券