
Imagick::getImageProperties 함수의 반환값은 배열 형태로 오며, 배열 내의 키는 다음과 같습니다.
- filename: 이미지 파일 이름
- mimetype: 이미지 파일의 MIME 타입
- width: 이미지의 너비
- height: 이미지의 높이
- colors: 이미지의 색상 수
- format: 이미지 파일 형식
- signature: 이미지 파일의 서명
- channelCount: 이미지 채널 수
- colorSpace: 이미지 색상 공간
- compression: 이미지 압축 알고리즘
- compressionQuality: 이미지 압축 품질
- depth: 이미지 깊이
- interlaceScheme: 이미지 인터리브 스킴
- gamma: 이미지 감마
- chromaSubsampling: 이미지 색상 하위 샘플링
- xResolution: 이미지 X 해상도
- yResolution: 이미지 Y 해상도
- resolutionUnit: 이미지 해상도 단위
- thumbnail: 이미지 썸네일 정보
이 중에서 filename, mimetype, width, height, format, signature, channelCount, colorSpace는 필수적으로 반환되며, 나머지 프로퍼티는 선택적으로 반환됩니다.
Imagick::getImageProperties 함수의 반환값 예시는 다음과 같습니다.
#hostingforum.kr
php
$image = new Imagick('example.jpg');
$properties = $image->getImageProperties();
print_r($properties);
이 코드를 실행하면 이미지 프로퍼티의 키와 값이 출력됩니다.
2025-06-28 10:00