def do_size(self, w, h):
        """Apply size scaling."""
        if (w is None):
            self.logger.debug("size: no scaling (nop)")
        else:
            self.logger.debug("size: scaling to (%d,%d)" % (w, h))
            self.image = self.image.resize((w, h))
            self.width = w
            self.height = h