'Gets the the minimum and maximum pixel values for each band in
the image.
:returns: For a single-band image, a 2-tuple containing the
minimum and maximum pixel value.  For a multi-band image,
a tuple containing one 2-tuple for each band.'

def getextrema(self):

    self.load()
    if (self.im.bands > 1):
        extrema = []
        for i in range(self.im.bands):
            extrema.append(self.im.getband(i).getextrema())
        return tuple(extrema)
    return self.im.getextrema()
