도

Require content

· 2013-02-13 (수) 09:21:31 · 1011 · 1
thumb.lib.php에 function thumbnail의 함수를 추가하고 에러나는 부분을 없에니 Require content라고 나타나며 이미지로 빙글빙글 도는 사진이 나오게되었어요 해결방법을 가르쳐주세요
function thumbnail($org_file, $new_file, $max_width, $max_height) {

$src_img = ImageCreateFromJPEG($org_file);
$img_info = getImageSize($org_file);
$img_width = $img_info[0];
$img_height = $img_info[1];
$img_ate = $max_width / $img_info[0];

if ($img_ate > 1) { //작은경우

$dst_width = $img_info[0];

$dst_height = "";

} else {

$dst_width = $max_width;

$dst_height = (int)($img_info[1] * $img_ate);

}

$dst_img = imagecreatetruecolor($dst_width, $dst_height);

ImageCopyResized($dst_img, $src_img, 0, 0, 0, 0, $dst_width, $dst_height, $img_width, $img_height);

ImageInterlace($dst_img);

ImageJPEG($dst_img, $new_file);
ImageDestroy($dst_img);

ImageDestroy($src_img);
}
|

댓글 1개

2013-02-13 (수) 10:40:00
이전 질문 내용의 소스와 함수명은 같지만 함수 규칙이 다름

위 내용의 thumbnail은
thumbnail($org_file, $new_file, $max_width, $max_height) {

기존 질문 내용은 thumbnail 은
$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가

위와 같은 흐름과 동일한 thumbnail 함수 찾아 적용하거나 위 질문 내용으 함수를 사용할 경우 출력.처리($thumb) 할 곳의 함수를 위 함수에 맞게 수정
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-02-13 조회 1,100
13-02-13 조회 1,059
13-02-13 조회 1,012
13-02-13 조회 942
13-02-13 조회 1,221
13-02-13 조회 2,338
13-02-13 조회 1,667
13-02-12 조회 1,703
13-02-12 조회 1,333
13-02-12 조회 955
13-02-12 조회 1,301
13-02-12 조회 690
13-02-12 조회 843
13-02-12 조회 936
13-02-12 조회 2,504
13-02-12 조회 803
13-02-12 조회 1,398
13-02-12 조회 899
13-02-12 조회 1,118
13-02-12 조회 945