Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
Makernote (proprietary) tag definitions for FujiFilm.
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/FujiFilm.html
"""
from ...utils import make_string
TAGS = {
0x0000: ('NoteVersion', make_string),
0x0010: ('InternalSerialNumber', ),
0x1000: ('Quality', ),
0x1001: ('Sharpness', {
0x1: 'Soft',
0x2: 'Soft',
0x3: 'Normal',
0x4: 'Hard',
0x5: 'Hard2',
0x82: 'Medium Soft',
0x84: 'Medium Hard',
0x8000: 'Film Simulation'
}),
0x1002: ('WhiteBalance', {
0x0: 'Auto',
0x100: 'Daylight',
0x200: 'Cloudy',
ret_str = '+'
step = seq[2] # Assume third value means the step size
whole = a / step
a = a % step
if whole != 0:
ret_str = '%s%s ' % (ret_str, str(whole))
if a == 0:
ret_str += 'EV'
else:
r = Ratio(a, step)
ret_str = ret_str + r.__repr__() + ' EV'
return ret_str
# Nikon E99x MakerNote Tags
TAGS_NEW = {
0x0001: ('MakernoteVersion', make_string), # Sometimes binary
0x0002: ('ISOSetting', make_string),
0x0003: ('ColorMode', ),
0x0004: ('Quality', ),
0x0005: ('Whitebalance', ),
0x0006: ('ImageSharpening', ),
0x0007: ('FocusMode', ),
0x0008: ('FlashSetting', ),
0x0009: ('AutoFlashMode', ),
0x000B: ('WhiteBalanceBias', ),
0x000C: ('WhiteBalanceRBCoeff', ),
0x000D: ('ProgramShift', ev_bias),
# Nearly the same as the other EV vals, but step size is 1/12 EV (?)
0x000E: ('ExposureDifference', ev_bias),
0x000F: ('ISOSelection', ),
0x0010: ('DataDump', ),
0x0011: ('NikonPreview', ),
0x8825: ('GPSInfo', GPS_INFO), # GPS tags
0x8827: ('ISOSpeedRatings', ),
0x8828: ('OECF', ),
0x8830: ('SensitivityType', {
0: 'Unknown',
1: 'Standard Output Sensitivity',
2: 'Recommended Exposure Index',
3: 'ISO Speed',
4: 'Standard Output Sensitivity and Recommended Exposure Index',
5: 'Standard Output Sensitivity and ISO Speed',
6: 'Recommended Exposure Index and ISO Speed',
7: 'Standard Output Sensitivity, Recommended Exposure Index and ISO Speed'
}),
0x8832: ('RecommendedExposureIndex', ),
0x8833: ('ISOSpeed', ),
0x9000: ('ExifVersion', make_string),
0x9003: ('DateTimeOriginal', ),
0x9004: ('DateTimeDigitized', ),
0x9101: ('ComponentsConfiguration', {
0: '',
1: 'Y',
2: 'Cb',
3: 'Cr',
4: 'Red',
5: 'Green',
6: 'Blue'
}),
0x9102: ('CompressedBitsPerPixel', ),
0x9201: ('ShutterSpeedValue', ),
0x9202: ('ApertureValue', ),
0x9203: ('BrightnessValue', ),
0x9204: ('ExposureBiasValue', ),