def get_dimensions(size, pots):
    '''Returns closest greater or equal than power-of-two dimensions.
    
    If a dimension is bigger than max(pots), that dimension will be returned
    as None.
    
    '''
    width, height = None, None
    for pot in pots:
        # '<=' means dimension will not change if already a power-of-two
        if size[0] <= pot:
            width = pot
            break
    for pot in pots:
        if size[1] <= pot:
            height = pot
            break
    return width, height
Returns closest greater or equal than power-of-two dimensions.
    
    If a dimension is bigger than max(pots), that dimension will be returned
    as None.
    
    
recipes/Python/576416_Pad_images_poweroftwo/recipe-576416.py