캘러리세로형 스킨입니다. > 그누4 스킨

그누4 스킨

스킨의 저작권은 해당 스킨 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
스킨 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y
그누보드와 관련이 있지만 스킨과 빌더가 아니면 플러그인 게시판에 올려주세요.

캘러리세로형 스킨입니다. 정보

갤러리 캘러리세로형 스킨입니다.

첨부파일

i_gal.zip (72.4K) 199회 다운로드 2007-01-26 14:23:07

본문

image_size.php  는  그누보드/shop/image_size.php  로 해주세요.

데모

http://pkgtest.mireene.com/gnu/bbs/board.php?bo_table=top01
추천
2

댓글 전체

참고로...  아래 파일...전 아직 안해봤는데요.. 누가좀 해주징~~ 흐~ 좋을거 같아요.
출처: http://au3.php.net/manual/en/function.imagejpeg.php

function create_thumbnail( $source_file, $destination_file, $max_dimension)
{
  list($img_width,$img_height) = getimagesize($source_file); // Get the original dimentions
  $aspect_ratio = $img_width / $img_height;
   
  if ( ($img_width > $max_dimension) || ($img_height > $max_dimension) ) // If either dimension is too big...
  {
      if ( $img_width > $img_height ) // For wide images...
      {
          $new_width = $max_dimension;
          $new_height = $new_width / $aspect_ratio;
      }
      elseif ( $img_width < $img_height ) // For tall images...
      {
          $new_height = $max_dimension;
          $new_width = $new_height * $aspect_ratio;
      }
      elseif ( $img_width == $img_height ) // For square images...
      {
          $new_width = $max_dimension;
          $new_height = $max_dimension;
      }
      else { echo "Error reading image size."; return FALSE; }
  }
  else { $new_width = $img_width; $new_height = $img_height; } // If it's already smaller, don't change the size.
   
  // Make sure these are integers.
  $new_width = intval($new_width);
  $new_height = intval($new_height);
   
  $thumbnail = imagecreatetruecolor($new_width,$new_height); // Creates a new image in memory.

  // The following block retrieves the source file.  It assumes the filename extensions match the file's format.
  if ( strpos($source_file,".gif") ) { $img_source = imagecreatefromgif($source_file); }
  if ( (strpos($source_file,".jpg")) || (strpos($source_file,".jpeg")) )
  { $img_source = imagecreatefromjpeg($source_file); }
  if ( strpos($source_file,".bmp") ) { $img_source = imagecreatefromwbmp($source_file); }
  if ( strpos($source_file,".png") ) { $img_source = imagecreatefrompng($source_file); }
   
  // Here we resample and create the new jpeg.
  imagecopyresampled($thumbnail, $img_source, 0, 0, 0, 0, $new_width, $new_height, $img_width, $img_height);
  imagejpeg( $thumbnail, $destination_file, 100 );
   
  // Finally, we destroy the two images in memory.
  imagedestroy($img_source);
  imagedestroy($thumbnail);
}
유용할거 같아요.. 시간날때 써먹게 여기에 올려놓을게요..
----------------------------------------------------
전체 5,850 |RSS
그누4 스킨 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT