def __init__(self): super(FlacHandler, self).__init__() self._ds = None self._media_entry = None self._stream = None self._tag_group = None self._elements = { 0: Element(_('Stream Info'), self._read_stream_info), 1: Element(_('Padding'), self._read_padding), 2: Element(_('Application'), self._read_application), 3: Element(_('Seek Table'), self._read_seek_table), 4: Element(_('Vorbis Comment'), self._read_vorbis_comments), 5: Element(_('Cue Sheet'), self._read_cue_sheet), 6: Element(_('Picture'), self._read_picture), }
def __init__(self, log_indent_level=0): super(IPTCNAAHandler, self).__init__(log_indent_level) self.metadata = {} self._encoding = 'ISO-8859-1' self._elements = { (1, 0): Element(_('Model Version')), (1, 5): Element(_('Destination')), (1, 90): Element(_('Coded Character Set'), self._parse_character_set), (2, 0): Element(_('Record Version'), self._parse_number, key='version'), (2, 5): Element(_('Name'), self._parse_string, key='object'), (2, 7): Element(_('Edit Status'), self._parse_string, key='edit_status'), (2, 8): Element(_('Editorial Update'), self._parse_string, key='editorial_update'), (2, 10): Element(_('Urgency'), self._parse_string, key='urgency'), (2, 12): Element(_('Subject'), self._parse_string, key='reference'), (2, 15): Element(_('Category'), self._parse_string, key='category'), (2, 20): Element(_('Supplemental Category'), self._parse_string, key='supplemental_category'), (2, 22): Element(_('Fixture Identifier'), self._parse_string, key='fixture_identifier'), (2, 25): Element(_('Keywords'), self._parse_string, key='keywords'), (2, 26): Element(_('Content Location Code'), self._parse_string, key='content_location_code'), (2, 27): Element(_('Content Location Name'), self._parse_string, key='content_location_name'), (2, 30): Element(_('Release Date'), self._parse_date, key='release_date'), (2, 35): Element(_('Release Time'), self._parse_time, key='release_time'), (2, 37): Element(_('Expiration Date'), self._parse_date, key='expiration_date'), (2, 38): Element(_('Expiration Time'), self._parse_time, key='expiration_time'), (2, 40): Element(_('Special Instructions'), self._parse_string, key='special_instructions'), (2, 42): Element(_('Action Advised'), self._parse_string, key='action_advised'), (2, 45): Element(_('Reference Service'), self._parse_string, key='reference_service'), (2, 47): Element(_('Reference Date'), self._parse_date, key='reference_date'), (2, 50): Element(_('Reference Number'), self._parse_string, key='reference_number'), (2, 55): Element(_('Date Created'), self._parse_date, key='creation_date'), (2, 60): Element(_('Time Created'), self._parse_time, key='creation_time'), (2, 62): Element(_('Digital Creation Date'), self._parse_date, key='digital_creation_date'), (2, 63): Element(_('Digital Creation Time'), self._parse_time, key='digital_creation_time'), (2, 65): Element(_('Originating Program'), self._parse_string, key='originating_program'), (2, 70): Element(_('Program Version'), self._parse_string, key='program_version'), (2, 75): Element(_('Object Cycle'), self._parse_string, key='object_cycle'), (2, 80): Element(_('Byline'), self._parse_string, key='byline'), (2, 85): Element(_('Byline Title'), self._parse_string, key='byline_title'), (2, 90): Element(_('City'), self._parse_string, key='city'), (2, 92): Element(_('Sub-location'), self._parse_string, key='sublocation'), (2, 95): Element(_('Province/State'), self._parse_string, key='province'), (2, 100): Element(_('Country/Primary Location Code'), self._parse_string, key='country_code'), (2, 101): Element(_('Country/Primary Location Name'), self._parse_string, key='country_name'), (2, 103): Element(_('Original Transmission Reference'), self._parse_string, key='original_reference'), (2, 105): Element(_('Headline'), self._parse_string, key='headline'), (2, 110): Element(_('Credit'), self._parse_string, key='credit'), (2, 115): Element(_('Source'), self._parse_string, key='source'), (2, 116): Element(_('Copyright Notice'), self._parse_string, key='copyright'), (2, 118): Element(_('Contact'), self._parse_string, key='contact'), (2, 120): Element(_('Caption'), self._parse_string, key='caption'), (2, 122): Element(_('Write/Editor'), self._parse_string, key='writer_editor'), (2, 125): Element(_('Rasterized Caption'), self._parse_bitmap, key='caption_rasterized'), (2, 130): Element(_('Image Type'), self._parse_string, key='image_type'), (2, 131): Element(_('Image Orientation'), self._parse_string, key='image_orientation'), (2, 135): Element(_('Language Identifier'), self._parse_string, key='language'), (2, 150): Element(_('Audio Type')), (2, 151): Element(_('Audio Sampling Rate')), (2, 152): Element(_('Audio Sampling Resolution')), (2, 153): Element(_('Audio Duration')), (2, 154): Element(_('Audio Outcue')), (2, 200): Element(_('ObjectData Preview File Format')), (2, 201): Element(_('ObjectData Preview File Format Version')), (2, 202): Element(_('ObjectData Preview Data')), (3, 0): Element(_('Record Version')), (3, 10): Element(_('Picture Number')), (3, 20): Element(_('Pixels Per Line')), (3, 30): Element(_('Number of Lines')), (3, 40): Element(_('Pixel Size In Scanning Direction')), (3, 50): Element(_('Pixel Size Perpendicular To Scanning Direction')), (3, 55): Element(_('Supplement Type')), (3, 60): Element(_('Colour Representation')), (3, 64): Element(_('Interchange Colour Space')), (3, 65): Element(_('Colour Sequence')), (3, 66): Element(_('ICC Input Colour Profile')), (3, 70): Element(_('Colour Calibration Matrix Table')), (3, 80): Element(_('Lookup Table')), (3, 84): Element(_('Number Of Index Entries')), (3, 85): Element(_('Colour Palette')), (3, 86): Element(_('Number Of Bits Per Sample')), (3, 90): Element(_('Sampling Structure')), (3, 100): Element(_('Scanning Direction')), (3, 102): Element(_('Image Rotation')), (3, 110): Element(_('Data Compression Method')), (3, 120): Element(_('Quantisation Method')), (3, 125): Element(_('End Points')), (3, 130): Element(_('Excursion Tolerance')), (3, 135): Element(_('Bits Per Component')), (3, 140): Element(_('Maximum Density Range')), (3, 145): Element(_('Gamma Compensated Value')), (7, 10): Element(_('Size Mode'), self._parse_bool, key='fixed_size'), (7, 20): Element(_('Max Subfile Size'), self._parse_number, key='max_subfile_size'), (7, 90): Element(_('ObjectData Size'), self._parse_number, key='objectdata_size'), (7, 95): Element(_('Max ObjectData Size'), self._parse_number, key='objectdata_size_max'), (8, 10): Element(_('Subfile')), (9, 10): Element(_('Confirmed ObjectData Size'), self._parse_number, key='objectdata_size_confirmed'), }
def __init__(self): self.container = None self._ds = None self._media_entry = None self._media_stream = None self._tag_target = None self._attachment = None self.logger = logging.getLogger('mogul.media') # Name and Handler Function for each ASF GUID type. self._elements = { '75b22630-668e-11cf-a6d9-00aa0062ce6c': Element('ASF_Header', self._read_header), '75b22636-668e-11cf-a6d9-00aa0062ce6c': Element('ASF_Data'), '33000890-e5b1-11cf-89f4-00a0c90349cb': Element('ASF_Simple_Index'), 'd6e229d3-35da-11d1-9034-00a0c90349be': Element('ASF_Index'), 'feb103f8-12ad-4c64-840f-2a1d2f7ad48c': Element('ASF_Media_Object_Index'), '3cb73fd0-0c4a-4803-953d-edf7b6228f0c': Element('ASF_Timecode_Index'), '8cabdca1-a947-11cf-8ee4-00c00c205365': Element('ASF_File_Properties', self._read_file_properties), 'b7dc0791-a9b7-11cf-8ee6-00c00c205365': Element('ASF_Stream_Properties', self._read_stream_properties), '5fbf03b5-a92e-11cf-8ee3-00c00c205365': Element('ASF_Header_Extension', self._read_header_extension), '86d15240-311d-11d0-a3a4-00a0c90348f6': Element('ASF_Codec_List', self._read_codec_list), '1efb1a30-0b62-11d0-a39b-00a0c90348f6': Element('ASF_Script_Command'), 'f487cd01-a951-11cf-8ee6-00c00c205365': Element('ASF_Marker'), 'd6e229dc-35da-11d1-9034-00a0c90349be': Element('ASF_Bitrate_Mutual_Exclusion'), '75b22635-668e-11cf-a6d9-00aa0062ce6c': Element('ASF_Error_Correction'), '75b22633-668e-11cf-a6d9-00aa0062ce6c': Element('ASF_Content_Description', self._read_content_description), 'd2d0a440-e307-11d2-97f0-00a0c95ea850': Element('ASF_Extended_Content_Description', self._read_extended_content_description), '2211b3fa-bd23-11d2-b4b7-00a0c955fc6e': Element('ASF_Content_Branding'), '7bf875ce-468d-11d1-8d82-006097c9a2b2': Element('ASF_Stream_Bitrate_Properties', self._read_stream_bitrate_properties), '2211b3fb-bd23-11d2-b4b7-00a0c955fc6e': Element('ASF_Content_Encryption'), '298ae614-2622-4c17-b935-dae07ee9289c': Element('ASF_Extended_Content_Encryption'), '2211b3fc-bd23-11d2-b4b7-00a0c955fc6e': Element('ASF_Digital_Signature'), '1806d474-cadf-4509-a4ba-9aabcb96aae8': Element('ASF_Padding'), 'f8699e40-5b4d-11cf-a8fd-00805f5c442b': Element('ASF_Audio_Media'), 'bc19efc0-5b4d-11cf-a8fd-00805f5c442b': Element('ASF_Video_Media'), '59dacfc0-59e6-11d0-a3ac-00a0c90348f6': Element('ASF_Command_Media'), 'b61be100-5b4e-11cf-a8fd-00805f5c442b': Element('ASF_JFIF_Media'), '35907de0-e415-11cf-a917-00805f5c442b': Element('ASF_Degradable_JPEG_Media'), '91bd222c-f21c-497a-8b6d-5aa86bfc0185': Element('ASF_File_Transfer_Media'), '3afb65e2-47ef-40f2-ac2c-70a90d71d343': Element('ASF_Binary_Media'), '776257d4-c627-41cb-8f81-7ac7ff1c40cc': Element('ASF_Web_Stream_Media_Subtype'), 'da1e6b13-8359-4050-b398-388e965bf00c': Element('ASF_Web_Stream_Format'), '20fb5700-5b55-11cf-a8fd-00805f5c442b': Element('ASF_No_Error_Correction'), 'bfc3cd50-618f-11cf-8bb2-00aa00b4e220': Element('ASF_Audio_Spread'), 'abd3d211-a9ba-11cf-8ee6-00c00c205365': Element('ASF_Reserved_1'), '7a079bb6-daa4-4e12-a5ca-91d38dc11a8d': Element('ASF_Content_Encryption_System_Windows_Media_DRM_Network_Devices'), '86d15241-311d-11d0-a3a4-00a0c90348f6': Element('ASF_Reserved_2'), '4b1acbe3-100b-11d0-a39b-00a0c90348f6': Element('ASF_Reserved_3'), '4cfedb20-75f6-11cf-9c0f-00a0c90349cb': Element('ASF_Reserved_4'), 'd6e22a00-35da-11d1-9034-00a0c90349be': Element('ASF_Mutex_Language'), 'd6e22a01-35da-11d1-9034-00a0c90349be': Element('ASF_Mutex_Bitrate'), 'd6e22a02-35da-11d1-9034-00a0c90349be': Element('ASF_Mutex_Unknown'), 'af6060aa-5197-11d2-b6af-00c04fd908e9': Element('ASF_Bandwidth_Sharing_Exclusive'), 'af6060ab-5197-11d2-b6af-00c04fd908e9': Element('ASF_Bandwidth_Sharing_Partial'), '399595ec-8667-4e2d-8fdb-98814ce76c1e': Element('ASF_Payload_Extension_System_Timecode'), 'e165ec0e-19ed-45d7-b4a7-25cbd1e28e9b': Element('ASF_Payload_Extension_System_File_Name'), 'd590dc20-07bc-436c-9cf7-f3bbfbf1a4dc': Element('ASF_Payload_Extension_System_Content_Type'), '1b1ee554-f9ea-4bc8-821a-376b74e4c4b8': Element('ASF_Payload_Extension_System_Pixel_Aspect_Ratio'), 'c6bd9450-867f-4907-83a3-c77921b733ad': Element('ASF_Payload_Extension_System_Sample_Duration'), '6698b84e-0afa-4330-aeb2-1c0a98d7a44d': Element('ASF_Payload_Extension_System_Encryption_Sample_ID'), '14e6a5cb-c672-4332-8399-a96952065b5a': Element('ASF_Extended_Stream_Properties'), 'a08649cf-4775-4670-8a16-6e35357566cd': Element('ASF_Advanced_Mutual_Exclusion'), 'd1465a40-5a79-4338-b71b-e36b8fd6c249': Element('ASF_Group_Mutual_Exclusion'), 'd4fed15b-88d3-454f-81f0-ed5c45999e24': Element('ASF_Stream_Prioritization'), 'a69609e6-517b-11d2-b6af-00c04fd908e9': Element('ASF_Bandwidth_Sharing'), '7c4346a9-efe0-4bfc-b229-393ede415c85': Element('ASF_Language_List', self._read_language_list), 'c5f8cbea-5baf-4877-8467-aa8c44fa4cca': Element('ASF_Metadata', self._read_metadata), '44231c94-9498-49d1-a141-1d134e457054': Element('ASF_Metadata_Library', self._read_metadata_library), 'd6e229df-35da-11d1-9034-00a0c90349be': Element('ASF_Index_Parameters'), '6b203bad-3f11-48e4-aca8-d7613de2cfa7': Element('ASF_Media_Object_Index_Parameters'), 'f55e496d-9797-4b5d-8c8b-604dfe9bfb24': Element('ASF_Timecode_Index_Parameters'), '43058533-6981-49e6-9b74-ad12cb86d58c': Element('ASF_Advanced_Content_Encryption'), } # '75b22630-668e-11cf-a6d9-00aa0062ce6c': Element('ASF_Compatibility', None), self.DESCRIPTOR = { 'ID3': self._parse_id3v2_descriptor, 'TAG': self._parse_id3v1_descriptor, } self.__attribute_accessors = { 'artist': 'WM/AlbumArtist', 'album': 'WM/AlbumTitle', 'track': 'WM/TrackNumber', 'release_date': 'WM/Year', 'composer': 'WM/Composer', 'genre': 'WM/Genre', 'copyright': 'copyright', 'lyrics': 'WM/Lyrics', 'rating': 'rating', }
def __init__(self): self.container = MediaContainer() self._ds = None self._stream = None self._media_entry = None self._tag_group = None self._tag_target = None self._languages = None self._countries = None self.logger = logging.getLogger('mogul.media') self._elements = { b'clip': Element(_('Clipping')), b'cmov': Element(_('Compressed Movie')), b'crgn': Element(_('Clipping Region')), b'cslg': Element(_('Composition Shift Least Greatest')), b'ctab': Element(_('Colour Table'), self._read_ctab), b'ctry': Element(_('Country'), self._read_ctry), b'dinf': Element(_('Data Information'), self._read_dinf), b'dref': Element(_('Data Reference'), self._read_dref), b'edts': Element(_('Edit')), b'elst': Element(_('Edit List')), b'free': Element(_('Free')), b'ftyp': Element(_('File type'), self._read_ftyp), b'gmhd': Element(_('Base Media Information Header')), b'hdlr': Element(_('Handler'), self._read_hdlr), b'ilst': Element(_('Item List'), self._read_ilst), b'kmat': Element(_('Compressed Matte')), b'lang': Element(_('Language'), self._read_lang), b'matt': Element(_('Track Matte')), b'mdat': Element(_('Media data'), self._read_mdat), b'mdhd': Element(_('Media Header'), self._read_mdhd), b'mdia': Element(_('Media box'), self._read_mdia), b'meta': Element(_('Metadata'), self._read_meta), b'minf': Element(_('Media Info'), self._read_minf), b'moov': Element(_('Movie'), self._read_moov), b'mvhd': Element(_('Movie Header'), self._read_mvhd), b'name': Element(_('Name'), self._read_name), b'rmra': Element(_('Reference Movie')), b'prfl': Element(_('Profile')), b'sbgp': Element(_('Sample-to-Group')), b'sdtp': Element(_('Sample Dependency Flags')), b'sgpd': Element(_('Sample Group Description')), b'skip': Element(_('Skip')), b'smhd': Element(_('Sound Media Information Header'), self._read_smhd), b'stbl': Element(_('Sample Table'), self._read_stbl), b'stco': Element(_('Chunk Offset')), b'stps': Element(_('Partial Sync Sample')), b'stsc': Element(_('Sample-to-Chunk')), b'stsd': Element(_('Sample Description'), self._read_stsd), b'stss': Element(_('Sync Sample')), b'stsz': Element(_('Sample Size')), b'stts': Element(_('Time To Sample')), b'stsh': Element(_('Shadow Sync')), b'tkhd': Element(_('Track Header'), self._read_tkhd), b'trak': Element(_('Track'), self._read_trak), b'udta': Element(_('User Data'), self._read_udta), b'vmhd': Element(_('Video Media Information Header'), self._read_vmhd), b'wide': Element(_('64 Bit Expansion')), b'XMP_': Element(_('XMP MetaData'), self._read_xmp), } self._tagname_mapping = {'@alb': 'TITLE'} self.__attribute_accessors = { 'doctype': lambda: b'mp4', 'title': b'\xA9nam', 'artist': b'\xA9ART', 'album_artist': b'\aART', 'album': b'\xA9alb', 'track': b'trkn', 'release_date': b'\xA9day', 'writer': b'\xA9wrt', 'comment': b'', 'genre': self._get_id3_genre, 'compilation': b'cpil', 'gapless': b'pgap', 'encoder': b'\xA9too', 'lyrics': b'\xA9lyr', } self.__audio_formats = [ b'NONE', b'raw ', b'twos', b'sowt', b'MAC3', b'MAC6', b'ima4', b'fl32', b'fl64', b'in24', b'in32', b'ulaw', b'alaw', b'\x6d\x73\x00\x02', b'\x6d\x73\x00\x11', b'dvca', b'QDMC', b'QDM2', b'Qclp', b'\x6d\x73\x00\x55', b'.mp3', b'mp4a', b'alac' ] self.__visual_formats = [ b'cvid', b'jpeg', b'smc ', b'rle ', b'rpza', b'kpcd', b'png ', b'mjpa', b'mjpb', b'SVQ1', b'mp4v', b'dvc ', b'dvcp', b'gif ', b'h263', b'tiff', b'raw ', b'2vuY', b'yuv2', b'v308', b'v408', b'v216', b'v410', b'v210', b'avc1' ] self.__metadata_formats = [b'mp4s'] self.__text_formats = [b'text']
def __init__(self): super(EBMLHandler, self).__init__() self.container = None self._ds = None self._media_entry = None self._media_stream = None self._tag_target = None self._attachment = None self._elements = { b'\x1a\x45\xdf\xa3': Element(_('Header'), self._read_header), b'\xec': Element(_('Void')), b'\xbf': Element(_('CRC-32')), b'\x42\x82': Element(_('Doctype'), self._read_doctype), b'\x42\x86': Element(_('Version'), self._read_uint, key='version'), b'\x42\xf7': Element(_('Read Version'), self._read_uint, key='read_version'), b'\x42\xf2': Element(_('Max ID Length'), self._read_uint, key='max_id_len'), b'\x42\xf3': Element(_('Max Size Length'), self._read_uint, key='max_size_len'), b'\x42\x87': Element(_('Doctype Version'), self._read_uint, key='doctype_version'), b'\x42\x85': Element(_('Doctype Read Version'), self._read_uint, key='doctype_read_version'), b'\x18\x53\x80\x67': Element(_('Segment'), self._read_segment), b'\x2a\xd7\xb1': Element(_('Timecode Scale'), self._read_uint, key='timecode_scale'), b'\x4d\x80': Element(_('Muxing Application'), self._read_utf8, key='app_mux'), b'\x57\x41': Element(_('Writing Application'), self._read_utf8, key='app_write'), b'\x44\x89': Element(_('Duration'), self._read_rational, key='duration'), b'\x44\x61': Element(_('Date UTC'), self._read_date, key='date_utc'), b'\x73\xa4': Element(_('Segment UID'), self._read_segment_uid), b'\x11\x4d\x9b\x74': Element(_('Seek Head'), self._read_seek_head), b'\x4d\xbb': Element(_('Seek'), self._read_seek), b'\x53\xab': Element(_('Seek ID'), self._read_seek_id), b'\x53\xac': Element(_('Seek Position'), self._read_seek_pos), b'\x15\x49\xa9\x66': Element(_('Info'), self._read_info), b'\x1f\x43\xb6\x75': Element(_('Cluster'), self._read_cluster), b'\xe7': Element(_('Timecode')), b'\x58\x54': Element(_('Silent Tracks')), b'\xa7': Element(_('Position')), b'\xab': Element(_('Previous Size')), b'\xa3': Element(_('Simple Block'), log=False), b'\xa0': Element(_('Block Group')), b'\xa1': Element(_('Block')), b'\xa2': Element(_('Block Virtual')), b'\x75\xa1': Element(_('Block Additions')), b'\xa6': Element(_('Block More')), b'\xee': Element(_('Block Add ID')), b'\xa5': Element(_('Block Additional')), b'\x9b': Element(_('Block Duration')), b'\xfa': Element(_('Reference Priority')), b'\xfb': Element(_('Reference Block')), b'\xfd': Element(_('Reference Virtual')), b'\xa4': Element(_('Codec State')), b'\x8e': Element(_('Slices')), b'\xe8': Element(_('Time Slice')), b'\xcc': Element(_('Lace Number')), b'\xcd': Element(_('Frame Number')), b'\xcb': Element(_('Block Addition ID')), b'\xce': Element(_('Delay')), b'\xcf': Element(_('Slice Duration')), b'\xc8': Element(_('Reference Frame')), b'\xc9': Element(_('Reference Offset')), b'\xca': Element(_('Reference Timecode')), b'\xaf': Element(_('Encrypted Block')), b'\x16\x54\xae\x6b': Element(_('Tracks'), self._read_tracks), b'\xae': Element(_('Track Entry'), self._read_track_entry), b'\xd7': Element(_('Track Number'), self._read_track_number), b'\x73\xc5': Element(_('Track UID'), self._read_track_uid), b'\x83': Element(_('Track Type'), self._read_track_type), b'\xb9': Element(_('Flag Enabled')), b'\x88': Element(_('Flag Default')), b'\x55\xaa': Element(_('Flag Forced')), b'\x9c': Element(_('Flag Lacing')), b'\x6d\xe7': Element(_('Min Cache')), b'\x6d\xf8': Element(_('Max Cache')), b'\x23\xe3\x83': Element(_('Default Duration')), b'\x23\x31\x4f': Element(_('Track Timecode Scale')), b'\x55\xee': Element(_('Max Block Addition ID')), b'\x53\x6e': Element(_('Track Name'), self._read_track_name), b'\x22\xb5\x9c': Element(_('Track Language'), self._read_track_language), b'\x86': Element(_('Codec ID'), self._read_track_codec_id), b'\x63\xa2': Element(_('Codec Private')), b'\x25\x86\x88': Element(_('Codec Name')), b'\x74\x46': Element(_('Attachment Link')), b'\xaa': Element(_('Codec Decode All')), b'\x6f\xab': Element(_('Track Overlay')), b'\x66\x24': Element(_('Track Translate')), b'\x66\xfc': Element(_('Track Translate Edition UID')), b'\x66\xbf': Element(_('Track Translate Codec')), b'\x66\xa5': Element(_('Track Translate Track ID')), b'\xe0': Element(_('Video'), self._read_video), b'\x9a': Element(_('Flag Interlace'), self._read_video_entry), b'\x53\xb8': Element(_('Stereo Mode')), b'\xb0': Element(_('Pixel Width'), self._read_video_entry), b'\xba': Element(_('Pixel Height'), self._read_video_entry), b'\x54\xaa': Element(_('Pixel Crop Bottom')), b'\x54\xbb': Element(_('Pixel Crop Top')), b'\x54\xcc': Element(_('Pixel Crop Left')), b'\x54\xdd': Element(_('Pixel Crop Right')), b'\x54\xb0': Element(_('Display Width')), b'\x54\xba': Element(_('Display Height')), b'\x54\xb2': Element(_('Display Unit')), b'\x54\xb3': Element(_('Aspect Ratio')), b'\x2e\xb5\x25': Element(_('Colour Space'), self._read_color_space), b'\x2f\xb5\x23': Element(_('Gamma')), b'\x23\x83\xe3': Element(_('Frame Rate')), b'\xe1': Element(_('Audio')), b'\xb5': Element(_('Sampling Frequency')), b'\x78\xb5': Element(_('Output Sampling Frequency')), b'\x9f': Element(_('Channels')), b'\x7d\x7b': Element(_('Channel Positions')), b'\x62\x64': Element(_('Bit Depth')), b'\xe2': Element(_('Track Operation')), b'\xe3': Element(_('Track Combine Planes')), b'\xe4': Element(_('Track Plane')), b'\xe5': Element(_('Track Plane UID')), b'\xe6': Element(_('Track Plane Type')), b'\xe9': Element(_('Track Join Blocks')), b'\xed': Element(_('Track Join UID')), b'\x6d\x80': Element(_('Content Encodings')), b'\x62\x40': Element(_('Content Encoding')), b'\x50\x31': Element(_('Content Encoding Order')), b'\x50\x32': Element(_('Content Encoding Scope')), b'\x50\x33': Element(_('Content Encoding Type')), b'\x50\x34': Element(_('Content Compression')), b'\x42\x54': Element(_('Content Compression Algorithm')), b'\x42\x55': Element(_('Content Compression Settings')), b'\x50\x35': Element(_('Content Encryption')), b'\x47\xe1': Element(_('Content Encryption Algorithm')), b'\x47\xe2': Element(_('Content Encryption Key ID')), b'\x47\xe3': Element(_('Content Signature')), b'\x47\xe4': Element(_('Content Signature Key ID')), b'\x47\xe5': Element(_('Content Signature Algorithm')), b'\x47\xe6': Element(_('Content Signature Hash Algorithm')), b'\x1c\x53\xbb\x6b': Element(_('Cues'), self._read_cues), b'\xbb': Element(_('Cue Point')), b'\xb3': Element(_('Cue Time')), b'\xb7': Element(_('Cue Track Positions')), b'\xf7': Element(_('Cue Track')), b'\xf1': Element(_('Cue Cluster Position')), b'\x53\x78': Element(_('Cue Block Number')), b'\xea': Element(_('Cue Codec State')), b'\xdb': Element(_('Cue Reference')), b'\x96': Element(_('Cue Reference Time')), b'\x97': Element(_('Cue Reference Cluster')), b'\x53\x5f': Element(_('Cue Reference Number')), b'\xeb': Element(_('Cue Reference Codec State')), b'\x19\x41\xa4\x69': Element(_('Attachments'), self._read_attachments), b'\x61\xa7': Element(_('Attached File'), self._read_attached_file), b'\x46\x7e': Element(_('File Description'), self._read_file_description), b'\x46\x6e': Element(_('File Name'), self._read_file_name), b'\x46\x60': Element(_('File Mime Type'), self._read_file_mimetype), b'\x46\x5c': Element(_('File Data'), self._read_file_data), b'\x46\xae': Element(_('File UID'), self._read_file_uid), b'\x46\x75': Element(_('File Referral')), b'\x46\x61': Element(_('File Used Start Time')), b'\x46\x62': Element(_('File Used End Time')), b'\x10\x43\xa7\x70': Element(_('Chapters'), self._read_chapters), b'\x45\xb9': Element(_('Edition Entry')), b'\x45\xbc': Element(_('Edition UID')), b'\x45\xbd': Element(_('Edition Flag Hidden')), b'\x45\xdb': Element(_('Edition Flag Default')), b'\x45\xdd': Element(_('Edition Flag Ordered')), b'\xb6': Element(_('Chapter')), b'\x73\xc4': Element(_('Chapter UID')), b'\x91': Element(_('Chapter Time Start')), b'\x92': Element(_('Chapter Time End')), b'\x98': Element(_('Chapter Flag Hidden')), b'\x45\x98': Element(_('Chapter Flag Enabled')), b'\x6e\x67': Element(_('Chapter Segment UID')), b'\x6e\xbc': Element(_('Chapter Segment Edition UID')), b'\x63\xc3': Element(_('Chapter Physical Equivalent')), b'\x8f': Element(_('Chapter Track')), b'\x89': Element(_('Chapter Track Number')), b'\x80': Element(_('Chapter Display')), b'\x85': Element(_('Chapter String')), b'\x43\x7c': Element(_('Chapter Language')), b'\x43\x7e': Element(_('Chapter Country')), b'\x69\x44': Element(_('Chapter Process')), b'\x69\x55': Element(_('Chapter Process Codec ID')), b'\x45\x0d': Element(_('Chapter Process Private')), b'\x69\x11': Element(_('Chapter Process Command')), b'\x69\x22': Element(_('Chapter Process Time')), b'\x69\x33': Element(_('Chapter Process Data')), b'\x12\x54\xc3\x67': Element(_('Tags'), self._read_tags), b'\x73\x73': Element(_('Tag'), self._read_tag), b'\x63\xc0': Element(_('Targets'), self._read_targets), b'\x68\xca': Element(_('Target Type Value'), self._read_tag_target_type_value), b'\x63\xca': Element(_('Target Type'), self._read_tag_target_type), b'\x63\xc5': Element(_('Tag Track UID'), self._read_tag_track_uid), b'\x63\xc9': Element(_('Tag Edition UID'), self._read_tag_edition_uid), b'\x63\xc4': Element(_('Tag Chapter UID'), self._read_tag_chapter_uid), b'\x63\xc6': Element(_('Tag Attachment UID'), self._read_tag_attachment_uid), b'\x67\xc8': Element(_('Simple Tag'), self._read_simple_tag), b'\x45\xa3': Element(_('Tag Name'), self._read_tag_name), b'\x44\x7a': Element(_('Tag Language'), self._read_tag_language), b'\x44\x84': Element(_('Tag Default'), self._read_tag_default), b'\x44\x87': Element(_('Tag String'), self._read_tag_string), b'\x44\x85': Element(_('Tag Binary'), self._read_tag_binary), } self.__attribute_accessors = { 'doctype': ('header', '\x42\x82'), 'title': ('tag', 'TITLE', 30), 'artist': ('tag', 'ARTIST', 30), 'album_artist': ('tag', 'ARTIST', 50), 'album': ('tag', 'TITLE', 50), 'track': ('tag', 'PART_NUMBER', 30), 'release_date': ('tag', 'DATE_RELEASE'), 'writer': ('tag', 'LYRICIST'), 'comment': ('tag', 'COMMENT'), 'lead_performer': ('tag', 'LEAD_PERFORMER'), 'cover': ('attachment', 'cover'), 'thumbnail': ('attachment', 'small_cover'), }
def __init__(self, log_indent_level=0): super(JPEGHandler, self).__init__(log_indent_level) self.filename = '' self._elements = { 0xC0: Element(_('Baseline DCT'), self._read_sof), 0xC1: Element(_('Extended Sequential DCT'), self._read_sof), 0xC2: Element(_('Progressive DCT'), self._read_sof), 0xC3: Element(_('Lossless (Sequential)'), self._read_sof), 0xC4: Element(_('Define Huffman Tables')), 0xC5: Element(_('Differential Sequential DCT'), self._read_sof), 0xC6: Element(_('Differential Progressive DCT'), self._read_sof), 0xC7: Element(_('Differential Lossless (Sequential)'), self._read_sof), 0xC8: Element(_('Reserved')), 0xC9: Element(_('Extended Sequential DCT'), self._read_sof), 0xCA: Element(_('Progressive DCT'), self._read_sof), 0xCB: Element(_('Lossless (Sequential)'), self._read_sof), 0xCC: Element(_('Define Arithmetic Coding Conditioning')), 0xCD: Element(_('Differential Sequential DCT'), self._read_sof), 0xCE: Element(_('Differential Progressive DCT'), self._read_sof), 0xCF: Element(_('Differential Lossless (Sequential)'), self._read_sof), 0xD8: Element(_('Start Of Image'), self._read_soi), 0xD9: Element(_('End Of Image')), 0xDA: Element(_('Start Of Scan'), self._read_sos), 0xDB: Element(_('Define Quantisation Table')), 0xDC: Element(_('Define Number Of Lines')), 0xDD: Element(_('Define Restart Interval'), self._read_dri), 0xDE: Element(_('Define Hierarchical Progression')), 0xDF: Element(_('Expand Reference Component')), 0xE0: Element(_('APP0'), self._read_APP0), 0xE1: Element(_('APP1'), self._read_APP1), 0xE2: Element(_('APP2')), 0xE3: Element(_('APP3')), 0xE4: Element(_('APP4')), 0xE5: Element(_('APP5')), 0xE6: Element(_('APP6')), 0xE7: Element(_('APP7')), 0xE8: Element(_('APP8')), 0xE9: Element(_('APP9')), 0xEA: Element(_('APP10')), 0xEB: Element(_('APP11')), 0xEC: Element(_('APP12')), 0xED: Element(_('APP13'), self._read_APP13), 0xEE: Element(_('APP14')), 0xEF: Element(_('APP15')), 0xFE: Element(_('Comment'), self._read_comment), } self._ds = None self.thumbnail = None self.thumbnail_format = 0
def __init__(self, log_indent_level=0): super(PSDHandler, self).__init__(log_indent_level) self.metadata = {} self._ds = None self._resources_len = -1 self._elements = { 0x03E8: Element(_('Obsolete: Photoshop 2.0 only'), None), 0x03E9: Element(_('Macintosh print manager print metadata record'), None), 0x03EB: Element(_('Obsolete: Photoshop 2.0 only'), None), 0x03ED: Element(_('Resolution Info Structure'), None), 0x03EE: Element(_('Alpha Channel Names'), None), 0x03EF: Element(_('Obsolete: Display Info Structure'), None), 0x03F0: Element(_('Caption'), None), 0x03F1: Element(_('Border Information'), None), 0x03F2: Element(_('Background Colour'), None), 0x03F3: Element(_('Print Flags'), None), 0x03F4: Element(_('Grayscale And Multichannel Halftoning Information'), None), 0x03F5: Element(_('Colour Halftoning'), None), 0x03F6: Element(_('Duotone Halftoning'), None), 0x03F7: Element(_('Grayscale And Multichannel Transfer Function'), None), 0x03F8: Element(_('Colour Transfer Functions'), None), 0x03F9: Element(_('Duotone Transfer Functions'), None), 0x03FA: Element(_('Duotone Image Information'), None), 0x03FB: Element(_('Effective Black/White'), None), 0x03FC: Element(_('Obsolete'), None), 0x03FD: Element(_('EPS Options'), None), 0x03FE: Element(_('Quick Mask'), None), 0x03FF: Element(_('Obsolete'), None), 0x0400: Element(_('Layer State Information'), None), 0x0401: Element(_('Working Path'), None), 0x0402: Element(_('Layers Group Information'), None), 0x0403: Element(_('Obsolete'), None), 0x0404: Element(_('IPTC-NAA Record'), self._read_iptc_naa), 0x0405: Element(_('Raw Format Image Mode'), None), 0x0406: Element(_('JPEG Quality'), None), 0x0408: Element(_('Grid And Guides'), None), 0x0409: Element(_('Thumbnail Resource'), None), 0x040A: Element(_('Copyright Flag'), None), 0x040B: Element(_('URL'), None), 0x040C: Element(_('Thumbnail Resource'), None), 0x040D: Element(_('Obsolete: Global Angle'), None), 0x040E: Element(_('Obsolete: Colour Samplers Resource'), None), 0x040F: Element(_('ICC Profile'), None), 0x0410: Element(_('Watermark'), None), 0x0411: Element(_('ICC Untagged Profile'), None), 0x0412: Element(_('Effects Visible'), None), 0x0413: Element(_('Spot Halftone'), None), 0x0414: Element(_('Document ID Seed Number'), None), 0x0415: Element(_('Unicode Alpha Names'), None), 0x0416: Element(_('Indexed Colour Table Count'), None), 0x0417: Element(_('Transparency Index'), None), 0x0419: Element(_('Global Altitude'), None), 0x041A: Element(_('Slices'), None), 0x041B: Element(_('Workflow URL'), None), 0x041C: Element(_('Jump To XPEP'), None), 0x041D: Element(_('Alpha Identifiers'), None), 0x041E: Element(_('URL List'), None), 0x0421: Element(_('Version Info'), None), 0x0422: Element(_('Exif Data 1'), self._read_exif_data1), 0x0423: Element(_('Exif Data 3'), self._read_exif_data3), 0x0424: Element(_('XMP Metadata'), self._read_xmp), 0x0425: Element(_('Caption Digest'), None), 0x0426: Element(_('Print Scale'), None), 0x0428: Element(_('Pixel Aspect Ratio'), None), 0x0429: Element(_('Layer Comps'), None), 0x042A: Element(_('Alternate Duotone Colours'), None), 0x042B: Element(_('Alternate Spot Colours'), None), 0x042D: Element(_('Layer Selection IDs'), None), 0x042E: Element(_('HDR Toning Information'), None), 0x042F: Element(_('Print Information'), None), 0x0430: Element(_('Layer Groups Enabled ID'), None), 0x0431: Element(_('Colour Samplers Resource'), None), 0x0432: Element(_('Measurement Scale'), None), 0x0433: Element(_('Timeline Information'), None), 0x0434: Element(_('Sheet Disclosure'), None), 0x0435: Element(_('DisplayInfo Structure'), None), 0x0436: Element(_('Onion Skins'), None), 0x0438: Element(_('Count Information'), None), 0x043A: Element(_('Print Information'), None), 0x043B: Element(_('Print Style'), None), 0x043C: Element(_('Macintosh NSPrintInfo'), None), 0x043D: Element(_('Windows DEVMODE'), None), 0x0BB7: Element(_('Name Of Clipping Path'), None), 0x1B58: Element(_('Image Ready Variables'), None), 0x1B59: Element(_('Image Ready Data Sets'), None), 0x1F40: Element(_('Lightroom Workflow'), None), 0x2710: Element(_('Print Flags Information'), None), } self.metadata = {}
def __init__(self, log_indent_level=0): super(TIFFHandler, self).__init__(log_indent_level) self.filename = '' self.endian = '>' self._media_entry = None self._elements = { 254: Element(_('New Subfile Type'), key='subfile_type'), 255: Element(_('Subfile Type'), key='subfile_type'), 256: Element(_('Image Width'), key='image_width'), 257: Element(_('Image Length'), key='image_height'), 258: Element(_('Bits Per Sample'), key='bits_per_sample'), 259: Element(_('Compression'), key='compression'), 262: Element(_('Photometric Interpretation'), key='photometric_interpretation'), 263: Element(_('Thresholding'), key='thresholding'), 264: Element(_('Cell Width'), key='cell_width'), 265: Element(_('Cell Length'), key='cell_length'), 266: Element(_('Fill Order')), 269: Element(_('Document Name'), key='name'), 270: Element(_('Image Description'), key='description'), 271: Element(_('Make'), key='make'), 272: Element(_('Model'), key='model'), 273: Element(_('Strip Offsets'), key='strip_offsets'), 274: Element(_('Orientation'), key='orientation'), 277: Element(_('Samples Per Pixel'), key='samples_per_pixel'), 278: Element(_('Rows Per Strip'), key='rows_per_strip'), 279: Element(_('Strip Byte Counts'), key='strip_byte_counts'), 280: Element(_('Minimum Sample Value')), 281: Element(_('Maximum Sample Value')), 282: Element(_('X Resolution'), key='resolution_x'), 283: Element(_('Y Resolution'), key='resolution_y'), 284: Element(_('Planar Configuration')), 285: Element(_('Page Name'), key='page_name'), 286: Element(_('X Position'), key='position_x'), 287: Element(_('Y Position'), key='position_y'), 288: Element(_('Free Offsets')), 289: Element(_('Free Bytes Count')), 290: Element(_('Gray Response Unit')), 291: Element(_('Gray Response Curve')), 292: Element(_('T4 Options')), 293: Element(_('T6 Options')), 296: Element(_('Resolution Unit'), key='resolution_unit'), 297: Element(_('Page Number')), 301: Element(_('Transfer Function')), 305: Element(_('Software'), key="software"), 306: Element(_('Date/Time'), 'datetime', key='date_time'), 315: Element(_('Artist'), key='artist'), 316: Element(_('Host Computer'), key='host_computer'), 317: Element(_('Predictor')), 318: Element(_('White Point'), key='white_point'), 319: Element(_('Primary Chromatics'), key='primary_chromatics'), 320: Element(_('Colour Map'), key='colour_map'), 321: Element(_('Halftone Units')), 322: Element(_('Tile Width')), 323: Element(_('Tile Length')), 324: Element(_('Tile Offsets')), 325: Element(_('Tile Byte Counts')), 330: Element(_('Sub IFDs'), 'subifd'), 332: Element(_('Ink Sets')), 333: Element(_('Ink Names')), 334: Element(_('Number Of Inks')), 336: Element(_('Dot Range')), 337: Element(_('Target Printer')), 338: Element(_('Extra Samples')), 339: Element(_('Sample Format')), 340: Element(_('S Min Sample Value')), 341: Element(_('S Max Sample Value')), 342: Element(_('Transfer Range')), 343: Element(_('Clip Path')), 344: Element(_('X Clip Path Units')), 345: Element(_('Y Clip Path Units')), 346: Element(_('Indexed')), 347: Element(_('JPEG Quantization or Huffman Tables')), 351: Element(_('OPI')), 400: Element(_('Global Parameters IFD')), 401: Element(_('Profile Type')), 402: Element(_('Fax Profile')), 403: Element(_('Coding Methods')), 404: Element(_('Version Year')), 405: Element(_('Mode Number')), 433: Element(_('Decode')), 434: Element(_('Default Image Color')), 512: Element(_('JPEG Processor')), 513: Element(_('JPEG Interchange Format')), 514: Element(_('JPEG Interchange Format Length')), 515: Element(_('JPEG Restart Interval')), 517: Element(_('JPEG Lossless Predictors')), 518: Element(_('JPEG Point Transforms')), 519: Element(_('JPEG Q Tables')), 520: Element(_('JPEG DC Tables')), 521: Element(_('JPEG AC Tables')), 529: Element(_('YCbCr Coefficients')), 530: Element(_('YCbCr Sub-Sampling')), 531: Element(_('YCbCr Positioning')), 532: Element(_('Reference Black/White')), 559: Element(_('Strip Row Counts')), 700: Element(_('XMP'), 'xmp'), # Tags over 32768 are private/not part of TIFF Baseline. 32781: Element(_('OPI Related')), 32932: Element(_('Wang Annotation')), 33421: Element(_('CFA Repeat Pattern Dim')), 33422: Element(_('CFA Pattern')), 33423: Element(_('Battery Level'), key='battery_level'), 33432: Element(_('Copyright'), key='copyright'), 33434: Element(_('Exposure Time'), key='exposure_time'), 33437: Element(_('F Number'), key='f_stop'), 33445: Element(_('MD File Tag')), 33446: Element(_('MD Scale Pixel')), 33447: Element(_('MD Colour Table')), 33448: Element(_('MD Lab Name')), 33449: Element(_('MD Sample Info')), 33450: Element(_('MD Preparation Date'), 'mddate'), 33451: Element(_('MD Preparation Time'), 'mdtime'), 33452: Element(_('MD File Units')), 33550: Element(_('Model Pixel Scale Tag')), 33723: Element(_('IPTC'), 'iptc'), 33918: Element(_('INGR Packet Data Tag')), 33919: Element(_('INGR Flag Registers')), 33920: Element(_('IrasB Transformation Matrix')), 33922: Element(_('Model Tiepoint Tag')), 34264: Element(_('Model Transformation Tag')), 34377: Element(_('Photoshop'), 'photoshop'), 34665: Element(_('Exif IFD Offset'), 'exif_ifd'), 34675: Element(_('ICC Profile')), 34732: Element(_('Image Layer')), 34735: Element(_('Geo Key Directory Tag')), 34736: Element(_('Geo Double Params Tag')), 34737: Element(_('Geo Ascii Params Tag')), 34850: Element(_('Exposure Program')), 34852: Element(_('Spectral Sensitivity')), 34853: Element(_('GPS'), 'gps'), 34855: Element(_('ISO Speed Ratings')), 34856: Element(_('OECF')), 34857: Element(_('Interlace')), 34858: Element(_('Time Zone Offset')), 34859: Element(_('Self Timer Mode')), 34864: Element(_('Sensitivity Type')), 34865: Element(_('Standard Output Sensitivity')), 34866: Element(_('Recommended Exposure Index')), 34867: Element(_('ISO Speed'), key='iso_speed'), 34868: Element(_('ISO Speed Latitude yyy')), 34869: Element(_('ISO Speed Latitude zzz')), 34908: Element(_('Hylafax Fax Receive Parameters')), 34909: Element(_('Hylafax Fax Sub Address')), 34908: Element(_('Hylafax Fax Receive Time')), 36864: Element(_('Exif Version')), 36867: Element(_('Date Time Original')), 36868: Element(_('Date Time Digitized')), 37121: Element(_('Components Configuration')), 37122: Element(_('Compressed Bits Per Pixel')), 37377: Element(_('Shutter Speed')), 37378: Element(_('Aperture Value')), 37379: Element(_('Brightness')), 37380: Element(_('Exposure Bias')), 37381: Element(_('Max Aperture')), 37382: Element(_('Subject Distance')), 37383: Element(_('Metering Mode')), 37384: Element(_('Light Source')), 37385: Element(_('Flash')), 37386: Element(_('Focal Length')), 37387: Element(_('Flash Energy')), 37388: Element(_('Spatial Frequency Response')), 37389: Element(_('Noise')), 37390: Element(_('Focal Plane X Resolution')), 37391: Element(_('Focal Plane Y Resolution')), 37392: Element(_('Focal Plane Resolution Unit')), 37393: Element(_('Image Number')), 37394: Element(_('Security Classification')), 37395: Element(_('Image History')), 37396: Element(_('Subject Area')), 37397: Element(_('Exposure Index')), 37398: Element(_('TIFF/EP Standard ID')), 37399: Element(_('Sensing Method')), 37500: Element(_('Maker Note')), 37510: Element(_('User Comment')), 37520: Element(_('Sub Second Time')), 37521: Element(_('Sub Second Time Original')), 37522: Element(_('Sub Second Time Digitized')), 37677: Element('OCR Text', 'ocr_text'), 37678: Element('OCR Data', 'ocr_data'), 37679: Element(_('Page Content')), 37680: Element(_('OLE Dump')), 37681: Element(_('Content Position')), 37724: Element(_('Image Source Data')), 40091: Element(_('XP Title'), 'ucs2'), 40092: Element(_('XP Comment'), 'ucs2'), 40093: Element(_('XP Author'), 'ucs2'), 40094: Element(_('XP Keywords'), 'ucs2'), 40095: Element(_('XP Subject'), 'ucs2'), 40960: Element(_('Flashpix Version')), 40961: Element(_('Color Space')), 40962: Element(_('Pixel X Dimension')), 40963: Element(_('Pixel Y Dimension')), 40964: Element(_('Related Sound File')), 40965: Element(_('Interoperability'), 'i14y'), 41483: Element(_('Flash Energy')), 41484: Element(_('Spatial Frequency Response')), 41486: Element(_('Focal Plane X Resolution')), 41487: Element(_('Focal Plane Y Resolution')), 41488: Element(_('Focal Plane Resolution Unit')), 41492: Element(_('Subject Location')), 41493: Element(_('Exposure Index')), 41495: Element(_('Sensing Method')), 41728: Element(_('File Source')), 41729: Element(_('Scene Type')), 41730: Element(_('CFA Pattern')), 41985: Element(_('Custom Rendered')), 41986: Element(_('Exposure Mode')), 41987: Element(_('White Balance')), 41988: Element(_('Digital Zoom Ratio')), 41989: Element(_('Focal Length In 35mm')), 41990: Element(_('Scene Capture Type')), 41991: Element(_('Gain Control')), 41992: Element(_('Contrast')), 41993: Element(_('Saturation')), 41994: Element(_('Sharpness')), 41995: Element(_('Device Setting Description')), 41996: Element(_('Subject Distance Range')), 42016: Element(_('Image Unique ID')), 42032: Element(_('Camera Owner Name')), 42033: Element(_('Body Serial Number')), 42034: Element(_('Lens Specification')), 42035: Element(_('Lens Make')), 42036: Element(_('Lens Model')), 42037: Element(_('Lens Serial Number')), 42112: Element(_('GDAL Metadata')), 42113: Element(_('GDAL No Data')), 50215: Element(_('Oce Scanjob Description')), 50216: Element(_('Oce Application Selector')), 50217: Element(_('Oce Identification Number')), 50218: Element(_('Oce Imagelogic Characteristics')), 50706: Element(_('DNG Version')), 50707: Element(_('DNG Backward Version')), 50708: Element(_('Unique Camera Model')), 50709: Element(_('Localized Camera Model')), 50710: Element(_('CFA Plane Color')), 50711: Element(_('CFA Layout')), 50712: Element(_('Linearization Table')), 50713: Element(_('Black Level Repeat Dim')), 50714: Element(_('Black Level')), 50715: Element(_('Black Level Delta H')), 50716: Element(_('Black Level Delta V')), 50717: Element(_('White Level')), 50718: Element(_('Default Scale')), 50719: Element(_('Default Crop Origin')), 50720: Element(_('Default Crop Size')), 50721: Element(_('Color Matrix 1')), 50722: Element(_('Color Matrix 2')), 50723: Element(_('Camera Calibration 1')), 50724: Element(_('Camera Calibration 2')), 50725: Element(_('Reduction Matrix 1')), 50726: Element(_('Reduction Matrix 2')), 50727: Element(_('Analog Balance')), 50728: Element(_('As Shot Neutral')), 50729: Element(_('As Shot White XY')), 50730: Element(_('Baseline Exposure')), 50731: Element(_('Baseline Noise')), 50732: Element(_('Baseline Sharpness')), 50733: Element(_('Bayer Green Split')), 50734: Element(_('Linear Response Limit')), 50735: Element(_('Camera Serial Number')), 50736: Element(_('Lens Info')), 50737: Element(_('Chroma Blur Radius')), 50738: Element(_('Anti Alias Strength')), 50739: Element(_('Shadow Scale')), 50740: Element(_('DNG Private Data')), 50741: Element(_('Make Note Safety')), 50778: Element(_('Calibration Illuminant 1')), 50779: Element(_('Calibration Illuminant 2')), 50780: Element(_('Best Quality Scale')), 50784: Element(_('Alias Meta Data')), 50827: Element(_('Original RAW File Name')), 50828: Element(_('Original RAW File Data')), 50829: Element(_('Active Area')), 50830: Element(_('Masked Areas')), 50831: Element(_('As Shot ICC Profile')), 50832: Element(_('As Shot Profile Matrix')), 50833: Element(_('Current ICC Profile')), 50834: Element(_('Current Pre-Profile Matrix')), 50879: Element(_('Colorimetric Reference')), 50931: Element(_('Camera Calibration Signature')), 50932: Element(_('Profile Calibration Signature')), 50934: Element(_('As Shot Profile Name')), 50935: Element(_('Noise Reduction Applied')), 50936: Element(_('Profile Name')), 50937: Element(_('Profile Hue Saturation Mapping Dimensions')), 50938: Element(_('Profile Hue Saturation Mapping Data 1')), 50939: Element(_('Profile Hue Saturation Mapping Data 2')), 50940: Element(_('Profile Tone Curve')), 50941: Element(_('Profile Embed Policy')), 50942: Element(_('Profile Copyright')), 50964: Element(_('Forward Matrix 1')), 50965: Element(_('Forward Matrix 2')), 50966: Element(_('Preview Application Name')), 50967: Element(_('Preview Application Version')), 50968: Element(_('Preview Settings Name')), 50969: Element(_('Preview Settings Digest')), 50970: Element(_('Preview Colour Space')), 50971: Element(_('Preview Date Time')), 50972: Element(_('Raw Image Digest')), 50973: Element(_('Original Raw File Digest')), 50974: Element(_('Sub-Tile Block Size')), 50975: Element(_('Row Interleave Factor')), 50981: Element(_('Profile Look Table Dimensions')), 50982: Element(_('Profile Look Table Data')), 51008: Element(_('Opcode List 1')), 51009: Element(_('Opcode List 2')), 51022: Element(_('Opcode List 3')), 51041: Element(_('Noise Profile'), key='noise_profile'), } self.__gps_tags = { 0: Element(_('GPS Tag Version')), 1: Element(_('North or South Latitude')), 2: Element(_('gpslatitude'), 'gpslatitude'), 3: Element(_('East or West Longitude')), 4: Element(_('Longitude'), 'longitude'), 5: Element(_('Altitude Reference')), 6: Element(_('Altitude'), 'altitude'), 7: Element(_('GPS Time'), 'gpstime'), 8: Element(_('GPS Satellites')), 9: Element(_('GPS Receiver Status')), 10: Element(_('GPS Measurement Mode')), 11: Element(_('Measurement Precision')), 12: Element(_('Speed Unit')), 13: Element(_('Speed of GPS Receiver')), 14: Element(_('Reference for Direction of Movement')), 15: Element(_('Direction of Movement')), 16: Element(_('Reference for Direction of Image')), 17: Element(_('Direction of Image')), 18: Element(_('Geodetic Survey Data Used')), 19: Element(_('Reference for Latitude of Destination')), 20: Element(_('Latitude of Destination')), 21: Element(_('Reference for Longitude of Destination')), 22: Element(_('Longitude of Destination')), 23: Element(_('Reference for Bearing of Destination')), 24: Element(_('Bearing of Destination')), 25: Element(_('Reference for Distance to Destination')), 26: Element(_('Distance to Destination')), 27: Element(_('Name of GPS Processing Method')), 28: Element(_('Name of GPS Area')), 29: Element(_('GPS Date'), 'gpsdate'), 30: Element(_('GPS Differential Correction')), } self.__i14y_tags = { 1: Element(_('Interoperability Index')), } self._reads = None self._writes = None self._offset_size = -1 self._ifd_offsets = []