[python] 이미지 정보 가져오기

Logging·2021년 11월 20일
0

개발새발쿼카발

목록 보기
2/7
post-thumbnail

내가 가지고 있는 사진에서 정보를 얼마나 알수있는지 궁금해서 시작한 개발


- pip install pillow 패키지 다운
- 사진 메타데이터 딕셔너리 생성
- 코드 결과 :
{'ResolutionUnit': 2, 'ExifOffset': 12108, 'Make': 'FUJIFILM', 'Model': 'X-T30', 'Software': 'Digital Camera X-T30 Ver1.30', 'DateTime': '2021:11:17 22:53:55', 'XResolution': 300.0, 'YResolution': 300.0, 'ExifVersion': b'0231', 'ShutterSpeedValue': 8.965784, 'ApertureValue': 4.970854, 'DateTimeOriginal': '2021:11:11 15:14:14', 'DateTimeDigitized': '2021:11:11 15:14:14', 'BrightnessValue': 5.52, 'ExposureBiasValue': 0.0, 'MaxApertureValue': 3.0, 'MeteringMode': 3, 'LightSource': 0, 'Flash': 0, 'FocalLength': 55.0, 'ColorSpace': 1, 'FocalLengthIn35mmFilm': 83, 'FocalPlaneXResolution': 2660.0, 'FocalPlaneYResolution': 2660.0, 'OffsetTime': '+09:00', 'OffsetTimeOriginal': '+09:00', 'FocalPlaneResolutionUnit': 3, 'Sharpness': 0, 'SubjectDistanceRange': 0, 'SensingMethod': 2, 'FileSource': b'\x03', 'ExposureTime': 0.002, 'FNumber': 5.6, 'SceneType': b'\x01', 'ExposureProgram': 1, 'CustomRendered': 0, 'ISOSpeedRatings': 1600, 'ExposureMode': 1, 'SensitivityType': 1, 'WhiteBalance': 0, 'BodySerialNumber': '0DQ03441', 'LensSpecification': (18.0, 55.0, 2.8, 4.0), 'LensMake': 'FUJIFILM', 'LensModel': '18.0-55.0 mm f/2.8-4.0', 'LensSerialNumber': '0BC00941', 'SceneCaptureType': 0}

FUJIFILM
X-T30
18.0-55.0 mm f/2.8-4.0
2021:11:11 15:14:14

//TODO :
1. 다른 기종으로 찍은 사진으로 같은 데이터 가지고 올 수 있는지 확인 필요
2. GPS 정보도 가지고 올 수 있는지 확인 필요

profile
개발새발쿼카발로 기록중💾

0개의 댓글