 |
|
 |
 |
 |
 |
|
이미지 리사이징 |
이미지 리사이징 라이브러리는 GIF, JPEG 이미지를 데이터의 손상없이 원하는 크기로 줄여주는 라이브러리입니다. 이미지 리사이징 라이브러리를 활용하면 다양한 프로그램을 제작할 수 있습니다.
|
|
이미지 리사이징 라이브러리 인클루드(include)하기 |
include "/home/AsaProgram/library/php/class.imageResize.php"; |
|
이미지 리사이징 라이브러리의 객체생성하기 |
$imgResizeObj = new imageResize('./', './') // 현재 디렉터리
$fileName = "userfile.gif"; // 원본파일
$inputWidth = 163; // 생성될 파일의 가로크기
$inputHeight = 65; // 생성될 파일의 세로크기
$originDir = './'; // 원본파일의 경로
$targetDir = './'; // 생성될 파일의 경로
$targetFile = $imgResizeObj->image_resize($fileName, $inputWidth, $inputHeight, $isCut, $originDir, $targetDir);
/*
현재 디렉터리에 생성된 파일이 $targeFile에 들어있습니다.
*/ |
|
|
|
 |