이미지 처리 및 GD jpeg2wbmp

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

jpeg2wbmp — JPEG 이미지 파일을 WBMP 이미지 파일로 변환

경고 이 함수는 PHP 7.2.0부터 DEPRECATED되었으며 PHP 8.0.0부터 제거되었습니다. 이 함수에 의존하는 것은 매우 권장되지 않습니다.


설명

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

JPEG 파일을 WBMP 파일로 변환합니다.


매개변수

jpegname
JPEG 파일의 경로입니다.
wbmpname
대상 WBMP 파일의 경로입니다.
dest_height
대상 이미지 높이.
dest_width
대상 이미지 너비.
threshold
0에서 8(포함) 사이의 임계값입니다.

반환 값

성공하면 true를, 실패하면 false를 반환합니다.

주의 그러나 libgd가 이미지 출력에 실패하면 이 함수는 true를 반환합니다.


Examples

예제 #1 jpeg2wbmp() 예제

                  
<?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 이미지 파일로 변환