Exemple #1
0
def main(im):
    # Create the ASCII
    global out
    console.show_activity("Processing...")
    out = image2ASCII(im)
    console.hide_activity()
    # Render onto an image
    global outim
    console.show_activity("Rendering...")
    outim = RenderASCII(out)
    console.hide_activity()

    rootView.background_color = 0.92

    global i
    i = ui.ImageView()

    i.frame = (0, 10, 1024, 768)
    i.content_mode = ui.CONTENT_SCALE_ASPECT_FIT

    i.image = pil_to_ui(outim)
    rootView.add_subview(i)

    close.bring_to_front()

    view2.remove_subview(ishare)
    view2.x = 247
    view2.y = -285
    rootView.add_subview(view2)

    time.sleep(1.5)
    ui.animate(pulldown, 1)
Exemple #2
0
def main(im):
	global out
	out = image2ASCII(im)
	global outim
	outim = RenderASCII(out)
	
	rootView.background_color = 0.92
	
	global i
	i = ui.ImageView()
	
	i.frame = (0, 10, 1024, 768)
	i.content_mode = ui.CONTENT_SCALE_ASPECT_FIT
	
	i.image = pil_to_ui(outim)
	rootView.add_subview(i)
	
	
	view2.remove_subview(ishare)
	view2.x = 247
	view2.y = -285
	rootView.add_subview(view2)
	
	time.sleep(1.5)
	ui.animate(pulldown, 1)