일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Android
- 제주도
- Classic ASP
- 원두
- shared
- robusta
- 여행
- 태그를 입력해 주세요.
- xamarin.android
- liberica
- 프렌치프레스
- fso
- 함수
- NGUI
- 자마린
- 드립 커피
- 라이트 로스팅
- 미디엄 로스팅
- vbscript
- ServerVariables
- 수마트라 원두
- KO
- KnockoutJS
- Unity
- 템플릿
- 커피
- xamarin.forms
- 아라비카
- xamarin
- asp
- Today
- Total
개발人
Exif보는 무료콤포넌트 | ASP/SQL 본문
콤포넌트명:JwPhoto.dll
제작사:http://www.jwsoft.co.kr/pds/jwsoft/
설치법>
JwPhotoInfo.dll 을 웹서버에 설치 하기
JwPhoto 를 다운로드 받아서 압축을 풀면, JwPhotoInfo.dll 이 있습니다. 이 파일을 웹 서버에 설치 하기 위해서는
다음과 같이 하시면 됩니다.
1-1. 폴더 생성 및 파일 복사
해당 디스크의 Program Files 폴더로 이동하여 JWSoft 라는 폴더를 생성 합니다.
JWSoft 폴더에 JwPhotoInfo.dll 을 복사 합니다.
1-2. JwPhotoInfo.dll 등록
콘솔 command 창으로 JWSoft 폴더 까지 이동 후, 다음과 같은 명령어를 실행 합니다.
C:\Program Files\JWSoft> regsvr32 JwPhotoInfo.dll
다음과 같이 하시면, JwPhotoInfo.dll 이 웹서버에 등록 됩니다.
1-3. JwPhotoInfo.dll 제거
만약 JwPhotoInfo.dll 등록을 해제 하고 싶다면 regsvr32 /u JwPhotoInfo.dll 한 다음,
파일을 삭제 하시면 됩니다.
예제>
case asp
<%
'--JwPhoto Test --------------
loadPath = Server.MapPath("DSCN0526.JPG")
Set objPhoto = Server.CreateObject("JWPHOTOINFO.PhotoInfo")
' 파일을 load 한다.
objPhoto.LoadImagePath = loadPath
if objPhoto.IsExif=1 then
Response.Write "카메라 : " + objPhoto.CameraMaker + " " + objPhoto.CameraModel + "<BR>"
Response.Write "촬영일 : " + objPhoto.DateTime + "<BR>"
Response.Write "exif 버전 : " + objPhoto.Version + "<BR>"
Response.Write "해상도 : " + CStr(objPhoto.Width) + " x " + CStr(objPhoto.Height) + "<BR>"
Response.Write "X resolution(dpi) : " + objPhoto.Xresolution_dpi + "<BR>"
Response.Write "Y resolution(dpi) : " + objPhoto.Yresolution_dpi + "<BR>"
if objPhoto.FlashUsed=1 then
Response.Write "플래시 yes <BR>"
else
Response.Write "플래시 no <BR>"
end if
Response.Write "초점거리 : " + objPhoto.FocalLength + "<BR>"
Response.Write "셔터속도 : " + objPhoto.ExposureTime + "<BR>"
Response.Write "조리개값 : " + objPhoto.ApertureFNumber + "<BR>"
Response.Write "ISO 크기 : " + objPhoto.ISOequivalent + "<BR>"
Response.Write "촬영시 좌우회전 : " + objPhoto.Orientation + "<BR>"
Response.Write "노출보정 : " + objPhoto.ExposureBias + "<BR>"
Response.Write "화이트 발란스 : " + objPhoto.Whitebalance + "<BR>"
Response.Write "측광방식 : " + objPhoto.MeteringMode + "<BR>"
Response.Write "촬영모드 : " + objPhoto.ExposureProgram + "<BR>"
Response.Write "압축율 : " + objPhoto.CompressionLevel + "<BR>"
Response.Write "Brightness : " + objPhoto.Brightness + "<BR>"
Response.Write "Distance : " + objPhoto.Distance + "<BR>"
if objPhoto.IsColor=0 then
Response.Write "색상 : 흑백 <BR>"
else
Response.Write "색상 : 컬러 <BR>"
end if
end if
Set objPhoto = Nothing
%>
case asp.net(C#)
using System;
using System.Web;
using JWPHOTOINFOLib;
namespace TestNET.test
{
public class loadexif : System.Web.UI.Page
{
public bool m_exif=false; // 사진촬영정보 여부
// 사진 Exif 정보 얻기
public string m_cameraName=" ", m_model=" ", m_wdate=" ";
public string m_version=" ", m_size=" ";
public string m_xdip=" ", m_ydpi=" ", m_flash=" ";
public string m_focal=" ", m_expo_time=" ";
public string m_apert=" ", m_iso=" ", m_orient=" ";
public string m_expo_bias=" ", m_wbalrance=" ";
public string m_meterMode=" ", m_expo_prog=" ";
public string m_quality=" ", m_bright=" ", m_distance=" ";
public string m_iscolor=" ";
string m_filepath="";
private void Page_Load(object sender, System.EventArgs e)
{
// 촬영정보
getExif();
}
public void getExif() {
JWPHOTOINFOLib.IPhotoInfo objPhoto;
try {
objPhoto = new JWPHOTOINFOLib.PhotoInfo();
m_filepath = "DSCN0526.JPG";
objPhoto.LoadImagePath = Request.MapPath(m_filepath);
if(objPhoto.IsExif==1) {
m_exif = true;
m_cameraName = objPhoto.CameraMaker.Trim(); // 카메라
m_model = objPhoto.CameraModel.Trim(); // 모델
m_wdate = objPhoto.DateTime; // 촬영일
m_version = objPhoto.Version.Trim(); // exif 버젼
m_size = objPhoto.Width.ToString()+" x "+objPhoto.Height.ToString(); // 해상도
m_xdip = objPhoto.Xresolution_dpi.Trim(); // X resolution
m_ydpi = objPhoto.Yresolution_dpi.Trim(); // Y resolution
if(objPhoto.FlashUsed==1) m_flash = "Yes"; // 플래시 사용 여부
else m_flash = "No";
m_focal = objPhoto.FocalLength; // 초점거리
m_expo_time = objPhoto.ExposureTime.Trim(); // 셔터속도
m_apert = objPhoto.ApertureFNumber.Trim(); // 조리개값
m_iso = objPhoto.ISOequivalent.Trim(); // ISO 크기
m_orient = objPhoto.Orientation.Trim(); // 촬영시 좌우회전
m_expo_bias = objPhoto.ExposureBias.Trim(); // 노출보정
m_wbalrance = objPhoto.Whitebalance.Trim(); // 화이트 밸런스
m_meterMode = objPhoto.MeteringMode.Trim(); // 측광방식
m_expo_prog = objPhoto.ExposureProgram.Trim(); // 촬영모드
m_quality = objPhoto.CompressionLevel.Trim(); // 압축율
m_bright = objPhoto.Brightness.Trim(); // Brightness
m_distance = objPhoto.Distance.Trim(); // Distance
if(objPhoto.IsColor==0) m_iscolor = "흑백"; // 컬러/흑백
else m_iscolor = "컬러";
}
} catch (Exception ex) {return;}
}
}
}
'Classic ASP' 카테고리의 다른 글
세션 timeout 설정방법 (0) | 2015.05.23 |
---|---|
로그인시 로그인한 후 이전페이지로 돌려주기 (0) | 2015.05.23 |
Request에서 제공하는 ServerVariables (0) | 2015.05.23 |
Do~Loop 구문 (0) | 2015.05.23 |
For ~ Next 구문 (0) | 2015.05.23 |