def cropRect(rect, cropTop, cropBottom, cropLeft, cropRight):
    """
	Crops a rectangle by the specified number of pixels on each side.
	
	The input rectangle and return value are both a tuple of (x,y,w,h).
	"""
    x, y, w, h = rect
    x += cropLeft
    y += cropTop
    w -= cropLeft + cropRight
    h -= cropTop + cropBottom
    return x, y, w, h
