Convert http response object to image

by: Srikanth148, 7 years ago

Last edited: 7 years ago

How to I convert an http response object to image. I used urllib.request.urlopen to get http response object of URL. My requirement is I need to show screenshot of one page in another page in django project.



You must be logged in to post. Please login or register an account.



I am really not sure I follow. To return an image you can do

from flask import send_file

and then at the end of your page's function
return send_file(yourfilename, mimetype='image/gif')


-Harrison 7 years ago

You must be logged in to post. Please login or register an account.