def read_uic_image_property(fh):
 size = struct.unpack('B', fh.read(1))[0]
 name = struct.unpack(('%is' % size), fh.read(size))[0][:(-1)]
 (flags, prop) = struct.unpack('<IB', fh.read(5))
 if (prop == 1):
  value = struct.unpack('II', fh.read(8))
  value = (value[0] / value[1])
 else:
  size = struct.unpack('B', fh.read(1))[0]
  value = struct.unpack(('%is' % size), fh.read(size))[0]
 return dict(name=name, flags=flags, value=value)

def read_uic_image_property ( fh ) : size = struct . unpack ( 'B' , fh . read ( 1 ) ) [ 0 ] name = struct . unpack ( ( '%is' % size ) , fh . read ( size ) ) [ 0 ] [ : ( - 1 ) ] ( flags , prop ) = struct . unpack ( '<IB' , fh . read ( 5 ) ) if ( prop == 1 ) : value = struct . unpack ( 'II' , fh . read ( 8 ) ) value = ( value [ 0 ] / value [ 1 ] ) else : size = struct . unpack ( 'B' , fh . read ( 1 ) ) [ 0 ] value = struct . unpack ( ( '%is' % size ) , fh . read ( size ) ) [ 0 ] return dict ( name = name , flags = flags , value = value )
read uic imagepropertyex tag from file and return as dict .