copy_and_blit.blit_image: fix threshold computation