init push
This commit is contained in:
19
examples/read_ifd_tags.py
Normal file
19
examples/read_ifd_tags.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from qifdp import IFDTagMap
|
||||
from qifdp import get_raw_ifd_tag
|
||||
|
||||
file_path = "DSC00001.ARW"
|
||||
|
||||
# Get the DateTimeOriginal
|
||||
date = get_raw_ifd_tag(file_path=file_path)
|
||||
print(date)
|
||||
|
||||
# Get the camera brand name
|
||||
make = get_raw_ifd_tag(file_path=file_path, tag_bytes=IFDTagMap.Make)
|
||||
print(make)
|
||||
|
||||
# If the buffer from 0x80000 (512k) inst enough for parsing the IFD tag,
|
||||
# you can increase the buffer. Use either a hex value or an int.
|
||||
# 0x80000 | 524288
|
||||
# 0x100000 | 1048576
|
||||
date = get_raw_ifd_tag(file_path=file_path, read_buffer=0x100000)
|
||||
print(date)
|
||||
Reference in New Issue
Block a user