'**SUMMARY**
Scale the image to a new width and height.
If no height is provided, the width is considered a scaling value.
**PARAMETERS**
* *width* - either the new width in pixels, if the height parameter is > 0, or if this value
is a floating point value, this is the scaling factor.
* *height* - the new height in pixels.
* *interpolation* - how to generate new pixels that don\'t match the original pixels. Argument goes direction to cv.Resize. See http://docs.opencv.org/modules/imgproc/doc/geometric_transformations.html?highlight=resize#cv2.resize for more details
**RETURNS**
The resized image.
**EXAMPLE**
>>> img.scale(200, 100) #scales the image to 200px x 100px
>>> img.scale(2.0) #enlarges the image to 2x its current size
.. Warning::
The two value scale command is deprecated. To set width and height
use the resize function.
:py:meth:`resize`'

def scale(self, width, height=(-1), interpolation=cv2.INTER_LINEAR):

    (w, h) = (width, height)
    if (height == (-1)):
        w = int((self.width * width))
        h = int((self.height * width))
        if ((w > MAX_DIMENSION) or (h > MAX_DIMENSION) or (h < 1) or (w < 1)):
            logger.warning("Holy    Heck!    You    tried    to    make    an    image    really    big    or    impossibly    small.    I    can't    scale    that")
            return self
    scaledArray = np.zeros((w, h, 3), dtype='uint8')
    retVal = cv2.resize(self.getNumpyCv2(), (w, h), interpolation=interpolation)
    return Image(retVal, colorSpace=self._colorSpace, cv2image=True)
