def _qt4_scale(self, image):

        # Although Qt won't scale the image if it doesn't need to, it will make
        # a deep copy which we don't need.
        if image.width() != self._width or image.height()!= self._height:
            image = image.scaled(self._width, self._height)

        return image

#### EOF ######################################################################
Scales the given image if necessary.
dataset/ETHPy150Open enthought/pyface/pyface/ui/qt4/image_cache.py/ImageCache._qt4_scale