getimagesize() - Get the size of an image > PHP

본문 바로가기
사이트 내 전체검색

PHP

getimagesize() - Get the size of an image

페이지 정보

profile_image
작성자 관리자
댓글 0건 조회 6,220회 작성일 20-09-18 09:44

본문

이 함수는 GD 이미지 라이브러리가 필요하지 않습니다.


 $data = getimagesize($path);

 echo $data[0];
 echo "<br>";

 echo $data[1];
 echo "<br>";

 echo $data[2];
 echo "<br>";

 echo $data[3];
 echo "<br>";

 echo $data['bits'];
 echo "<br>";

 echo $data['channels'];
 echo "<br>";

 echo $data['mime'];
 echo "<br>";

 -----------------------------------
 $data[2]
 1 GIF
 2 JPG
 3 SWF
 4 PSD
 5 BMP
 6 TIFF(orden de bytes intel)
 7 TIFF(orden de bytes motorola)
 8 JPC
 9 JP2
 10 JPX
 11 JB2
 12 SWC
 13 IFF
 14 WBMP
 15 XBM
 -----------------------------------
 ex)
 [bits] => 8
 [channels] => 3
 [mime] => image/jpeg

 [channels] : RGB 화상 디폴트 3

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

Copyright © neion.co.kr All rights reserved.