def is_larger(im, dimensions):
    """
    Check if this image is currently larger in either axis than the desired
    dimensions. If either desired dimension is None, the image will be larger
    in that dimension.
    """
    w, h = im.size
    desired_w, desired_h = dimensions
    return w > (desired_w or 0) or h > (desired_h or 0)
