code: def upsample(self, factor):
          
          
          self.checkforpilimage()
          
          if type(factor) != type(0):
              raise RuntimeError, "Upsample factor must be an integer !"
          
          if self.verbose:
              print "Upsampling by a factor of %i" % factor
          self.pilimage = self.pilimage.resize((self.pilimage.size[0] * factor, self.pilimage.size[1] * factor))
          self.upsamplefactor = factor
          
          self.draw = None
docs: The inverse operation of rebin, applied on the PIL image.
          Do this before writing text or drawing on the image !
          The coordinates will be automatically converted for you