메뉴 건너뛰기

app

[PHP] 이미지 리사이징과 소문자로

박영식2009.01.02 16:50조회 수 4531댓글 0

    • 글자 크기
    //////////파일 리사이징///////////
    copy($file_name1,str_replace(".jpg","_o.jpg",$file_name1));
    $fnm=$file_name1;
    list($width, $height) = getimagesize($fnm);
    $newwidth = 300;
    $newheight = 225;
    // Load
    $thumb = imagecreatetruecolor($newwidth, $newheight);
    $source = imagecreatefromjpeg($fnm);
    // Resize
    imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
    // Output
    imagejpeg($thumb, $fnm);
   //////////파일 리사이징///////////

  $file2_name = strtolower($HTTP_POST_FILES[file2][name]); // 대문자를 소문자로 변경
박영식 (비회원)
    • 글자 크기

댓글 달기

suritam9
2013.12.02 조회 3162
lispro06
2017.06.22 조회 1617
suritam9
2019.04.05 조회 1851
lispro06
2013.12.10 조회 2739
lispro06
2014.02.08 조회 3806
이전 1 2 3 4 5 6 7 8 9 10... 14다음
첨부 (0)
위로