def _update_scan(uploaded_file, progress): if scan_id: update_scan(apibase, password, scan_id, progress)
print >> stderr, '...done.' preview_img = input.copy() preview_img.thumbnail((409, 280), Image.ANTIALIAS) _append_image('preview.jpg', preview_img) large_img = input.copy() large_img.thumbnail((900, 900), Image.ANTIALIAS) _append_image('large.jpg', large_img) min_coord = Coordinate(minrow, mincol, minzoom) max_coord = Coordinate(maxrow, maxcol, maxzoom) _append_file('manifest.txt', '\n'.join(appended_files)) update_scan(apibase, password, scan_id, uploaded_file, print_id, min_coord, max_coord, img_bounds) _update_step(STEP_FINISHED) yield ALL_FINISHED return # # If we got this far, it means nothing was detected in the image. # print >> stderr, '--old--' * 12 from decode import main as old_decode_main secondary_progress = old_decode_main(scan_id, url, old_decode_markers, apibase, password, None, True)