def resize_to(img_obj, new_height, new_width):
    """
    Resize an image to the specified dimensions
    """
    assert isinstance(new_height, int)
    assert isinstance(new_width, int)
    assert new_height > 0
    assert new_width > 0
    return img_obj.resize((new_width, new_height))