Example #1
0
 def GetMap(self, desired_frame_width, desired_frame_height):
     """Arguments:
     frame_width: long with the width in pixel.
     frame_height: long with the height in pixel.
     """
     if os.path.exists(self.filename):
         return HamaWrapper.getMap(self.filename, desired_frame_width, desired_frame_height)
     else:
         print "Error: File not found!"
Example #2
0
 def ShowMap(self, desired_frame_width, desired_frame_height):
     """Arguments:
     frame_width: long with the width in pixel.
     frame_height: long with the height in pixel.
     """
     if os.path.exists(self.filename):
         arr = HamaWrapper.getMap(self.filename, desired_frame_width, desired_frame_height)
         im = Image.frombuffer("RGB", (arr.shape[2], arr.shape[1]), arr.data)
         im.show()
     else:
         print "Error: File not found!"