Preview a image by canvas