Example #1
0
 def setScale(self, scale=1):
     self.scale = scale
     if self.dat is None:
         return
     pilim = floatToImg(self.dat*scale)
     pilim = pilim.resize(self.GetSize())
     self.SetBitmap(wx.BitmapFromImage(pilToImage(pilim)))
Example #2
0
 def setImage(self, im, scale=None):
     self.dat = im
     if scale is None:
         scale = self.scale
     self.scale = scale
     if self.dat is None:
         self.actualsize = (0,0)
         return
     pilim = floatToImg(im*scale)
     self.actualsize = pilim.size
     pilim = pilim.resize(self.GetSize())
     self.SetBitmap(wx.BitmapFromImage(pilToImage(pilim)))