def pics_generator(pics=[], posted_pic_list=None): for pic in pics: new_pic = "" if pic not in posted_pic_list: if not compatible_aspect_ratio(get_image_size(pic)): new_pic = resize_image(pic) yield pic, new_pic
def correct_ratio(photo): return compatible_aspect_ratio(get_image_size(photo))
def correct_ratio(photo): from instabot.api.api_photo import compatible_aspect_ratio, get_image_size return compatible_aspect_ratio(get_image_size(photo))