[이윰] EXIF 정보 이미지 넓이에 맞게 조정하기
페이지 정보
shadow2fox
2,552 2 2
2020.11.21 22:47:40
짧은주소
-
https://yadolee.com/tip/773 주소복사
본문
EXIF 정보 이미지 넓이에 맞게 조정하기
EXIF 정보창이 이미지 넓이와 무관하게 본문 넓이의 100%로 나타나는 게 보기 싫다면 다음과 같이 수정하자.
그누보드5/eyoom/classes/exif.class.php를 열어 foreach($this->exif_item as $key => $val) {를 검색하고 아래와 같이 수정한다.
수정 전
수정 후
.exif_info의 스타일에 max-width:100%;margin-left:auto;margin-right:auto를 추가한다.
그누보드5/eyoom/classes/exif.class.php를 열어 foreach($this->exif_item as $key => $val) {를 검색하고 아래와 같이 수정한다.
수정 전
foreach($this->exif_item as $key => $val) {
if($exif_value = $this->get_exif_value($key)) {
$exif_data[$key] = $exif_value;
}
}
$exif_info = '<div class="exif_info"><ul><li>';
수정 후
foreach($this->exif_item as $key => $val) {
if($exif_value = $this->get_exif_value($key)) {
$exif_data[$key] = $exif_value;
}
//이미지 크기 구하기
$size = getimagesize($source);
}
//이미지 넓이 값
$width = $size[0].'px';
$exif_info = '<div class="exif_info" style="width:'.$width.'"><ul><li>';
.exif_info의 스타일에 max-width:100%;margin-left:auto;margin-right:auto를 추가한다.
추천인 2
레벨 149
경험치 3,343,659
Progress Bar 80.23%
- 가입일 : 2015-03-10 12:21:44
- 서명 : 인간에게 가장 큰 선물은
자기 자신에게 기회를 주는 것이다.
- 크리스 가드너, Chris Gardner -
- 자기소개 : There's never a shortcut to happiness.


댓글2
하늘구장님의 댓글
축하합니다. 지뢰폭탄 제거로 45경험치를 획득하였습니다.
내사랑님의 댓글
축하합니다. 첫 댓글로 15경험치를 획득하였습니다.