'**SUMMARY**
Contract/Expand the roi. By default use a percentage, otherwise use pixels.
This is all done relative to the center of the roi
**PARAMETERS**
* *w* - the percent to grow shrink the region is the only parameter, otherwise
it is the new ROI width
* *h* - The new roi height in terms of pixels or a percentage.
* *percentage* - If true use percentages (e.g. 2 doubles the size), otherwise
use pixel values.
* *h* - a height.
**RETURNS**
Nothing.
**EXAMPLE**
>>> roi = ROI(10,10,100,100,img)
>>> roi.resize(2)
>>> roi.show()'

def resize(self, w, h=None, percentage=True):

    if ((h is None) and isinstance(w, (tuple, list))):
        h = w[1]
        w = w[0]
    if percentage:
        if (h is None):
            h = w
        nw = (self.w * w)
        nh = (self.h * h)
        nx = (self.xtl + ((self.w - nw) / 2.0))
        ny = (self.ytl + ((self.h - nh) / 2.0))
        self._rebase([nx, ny, nw, nh])
    else:
        nw = (self.w + w)
        nh = (self.h + h)
        nx = (self.xtl + ((self.w - nw) / 2.0))
        ny = (self.ytl + ((self.h - nh) / 2.0))
        self._rebase([nx, ny, nw, nh])
