S
Sam Sungshik Kong
Hello!
I'm writing ASP in Python.
I want to return an image stream from my ASP code
so that it will look like
<img src="image.asp">.
The problem is that Response.BinaryWrite only accepts SafeArray of Bytes as
parameter, if I understand it correctly.
How can I do it?
The example will be like this.
Response.Expires = 0
Response.Buffer = True
Response.Clear()
Response.ContentType = "image/gif"
Response.BinaryWrite(get_image()) #the function is below.
Response.End()
----------
def get_image():
f = open(file_name, "rb")
s = f.read()
f.close()
return s
Thanks in advance.
kong
I'm writing ASP in Python.
I want to return an image stream from my ASP code
so that it will look like
<img src="image.asp">.
The problem is that Response.BinaryWrite only accepts SafeArray of Bytes as
parameter, if I understand it correctly.
How can I do it?
The example will be like this.
Response.Expires = 0
Response.Buffer = True
Response.Clear()
Response.ContentType = "image/gif"
Response.BinaryWrite(get_image()) #the function is below.
Response.End()
----------
def get_image():
f = open(file_name, "rb")
s = f.read()
f.close()
return s
Thanks in advance.
kong