网络图片获取

Posted 七月的尾巴

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了网络图片获取相关的知识,希望对你有一定的参考价值。

import appuifw,e32,httplib

Conn=httplib.HTTPConnection("10.0.0.172", 80)
Conn.putrequest("GET",图片地址)
Conn.putheader(‘Accept‘, ‘*/*‘)
Conn.endheaders()
gif = Conn.getresponse().read()
gi=open("e:\\henryczq\\yzm.gif","w")
gi.write(gif)
gi.close()
img=Image.open("e:\\henryczq\\yzm.gif")
def handle_redraw(rect):
  canvas.blit(img)
canvas=appuifw.Canvas(redraw_callback=handle_redraw)
appuifw.app.body=canvas
appuifw.app.screen="normal"

e32.ao_sleep(5)

  

以上是关于网络图片获取的主要内容,如果未能解决你的问题,请参考以下文章