def get_id(frame):
    """Takes a photo_frame object and returns a list containing each image's 
    uniquely generated ID.
    """

    num = len(frame.photos)
    im_id = []
    for i in range(0, num):
        buf = len(str(i))
        if buf <= 8:
            im_id.append('0'*(8-buf)+str(i))
        else:
            raise ValueError('Over 99 999 999 images')
    return im_id