Require content > 그누4 질문답변

그누4 질문답변

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

Require content 정보

Require content

본문

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);
}
  • 복사

댓글 전체

이전 질문 내용의 소스와 함수명은 같지만 함수 규칙이 다름

위 내용의 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) 할 곳의 함수를 위 함수에 맞게 수정
© SIRSOFT
현재 페이지 제일 처음으로