jpeg2wbmp
JPEG 이미지 파일을 WBMP 이미지 파일로 변환합니다
함수 이름 : JPEG2WBMP ()
해당 버전 : PHP 4> = 4.0.5, PHP 5, PHP 7
기능 설명 : JPEG 이미지를 WBMP 이미지로 변환합니다
용법:
bool jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold)
매개 변수 :
$jpegname
: JPEG 이미지 파일의 경로 및 파일 이름입니다.$wbmpname
: 변환 된 WBMP 이미지 파일의 경로 및 파일 이름.$dest_height
: 변환 된 WBMP 이미지의 높이.$dest_width
: 변환 된 WBMP 이미지의 너비.$threshold
: 선택적 매개 변수, 이항 이미지에 사용되는 임계 값을 나타냅니다. 기본값은 80입니다.반품 값 :
예:
$jpegname = 'path/to/image.jpg'; $wbmpname = 'path/to/image.wbmp'; $dest_height = 200; $dest_width = 200; $threshold = 80; if (jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold)) { echo 'JPEG image converted to WBMP successfully.'; } else { echo 'Failed to convert JPEG image to WBMP.'; }
위의 예제는 지정된 JPEG 이미지를 200x200 픽셀의 WBMP 이미지로 변환하고 임계 값을 80으로 설정합니다. 변환이 성공하면 "JPEG 이미지가 WBMP로 성공적으로 변환되었습니다." 그렇지 않으면 출력은 "JPEG 이미지를 WBMP로 변환하지 못했습니다."