Exemplo n.º 1
0
def DisplayFinalPicture(screen, finalPic):
    gui.bg_redraw(screen)

    # Show photobooth picture on gui
    showImg = cv.CreateImage((int(finalPic.width*config.FINAL_IMG_DISPLAY_SIZE), int(finalPic. height*config.FINAL_IMG_DISPLAY_SIZE)), finalPic.depth, finalPic.nChannels)
    cv.Resize(finalPic, showImg)
    cv.CvtColor(showImg, showImg, cv.CV_BGR2RGB)

    pg_img = pygame.image.frombuffer( showImg.tostring(), cv.GetSize(showImg), "RGB" )

    screen.blit( pg_img, (int((screen.get_width() - pg_img.get_width())/2), config.FINAL_IMG_DISPLAY_POS_TOP))
    gui.display_done_text(screen, "All Done!", "Your pictures are being printed")
    pygame.display.flip()
Exemplo n.º 2
0
def StartSession():
    global countdown_timer 
    
    logger.info("START CAPTURE %d" % (stats.incr_session_count()))
    # turn off blink timer
    pygame.time.set_timer(EVT_BTN_BLINK, 0)               
    # start picture taking timer
    pygame.time.set_timer(EVT_PICTURE, int(config.DELAY_SECS * 1000))
    # start countdown update timer
    countdown_timer = config.DELAY_SECS
    pygame.time.set_timer(EVT_COUNTDOWN, 1000)
    # update screen
    gui.bg_redraw(screen)
    gui.show_all_thumbnail_markers(screen)
    gui.show_thumbnail_marker(screen, 0, config.MARKER_SELECT_COLOR)
    gui.display_delay(screen, "Get Ready...", countdown_timer)
    pygame.display.flip()