コード例 #1
0
 def show1IFDTag(self, index: int):
     index -= 1
     tag = self.s10_exif_1IFD_3tags[index]
     #
     bayt_length = tag.t2_type_2obj.t3_length * tag.t3_count_2int
     print()
     print("\t" + "#" * 63)
     print("\tTag No          : " + str(index + 1))
     print("\tTag (Hex)       : '" + tag.t1_tag_1bytes.hex(sep=' ') + "'")
     print("\tTag Name        : " + tag.t1_tag_2str)
     print("")
     print("\tData Type (Hex) : " + tag.t2_type_1bytes.hex(sep=' '))
     print("\tData Type (str) : " + tag.t2_type_2obj.t2_name)
     print("\tData Length     : " + str(bayt_length) + " bayt")
     if tag.t4_value_offset_3offset_bool:
         start_offset = clength(tag.t4_value_offset_1bytes) + 10
         print("")
         print("\t(Data)")
         s4hex(dataBytes=self.s11_data[start_offset:start_offset +
                                       bayt_length],
               columnSize=20)
     else:
         print("")
         print("\t(Data)")
         s4hex(dataBytes=tag.t4_value_offset_1bytes, columnSize=20)
     print("\t" + "#" * 63)
コード例 #2
0
 def showGpsIFDTags(self):
     count = 1
     for tag in self.s9_exif_GpsIFD_3tags:
         bayt_length = tag.t2_type_2obj.t3_length * tag.t3_count_2int
         print()
         print("\t" + "#" * 63)
         print("\tTag No          : " + str(count))
         print("\tTag (Hex)       : '" + tag.t1_tag_1bytes.hex(sep=' ') +
               "'")
         print("\tTag Name        : " + tag.t1_tag_2str)
         print("")
         print("\tData Type (Hex) : " + tag.t2_type_1bytes.hex(sep=' '))
         print("\tData Type (str) : " + tag.t2_type_2obj.t2_name)
         print("\tData Length     : " + str(bayt_length) + " bayt")
         if tag.t4_value_offset_3offset_bool:
             start_offset = clength(tag.t4_value_offset_1bytes) + 10
             print("")
             print("\t(Data)")
             s4hex(dataBytes=self.s11_data[start_offset:start_offset +
                                           bayt_length],
                   columnSize=20)
         else:
             print("")
             print("\t(Data)")
             s4hex(dataBytes=tag.t4_value_offset_1bytes, columnSize=20)
         print("\t" + "#" * 63)
         count += 1