You'll need to write a component for reading the image (if you want to send it to the browser this way).
VBScript doesn't come with a read binary file function, but MS has posted the VB code for a very simple component that does this that we've been using for sometime without incident. It's simple, it's free, and it works fine.
Enclosed is a rough copy of this code:
Function readBinFile(ByVal bfilename As String)
Dim fl As Long
Dim binbyte() As Byte
Open bfilename For Binary Access Read As #1
fl = FileLen(bfilename)
ReDim binbyte(fl)
Get #1, , binbyte
Close #1
readBinFile = binbyte
End Function
Main Topics
Browse All Topics





by: makerpPosted on 2000-05-26 at 03:56:35ID: 2849218
you need to open the file then read it into a variable then use binary write to put the variable out. before you put the variable out make sure you set the cintent type to be image/jpg or image/gif depending on what your putting out
Response.ContentType = "image/gif"
youll have to read it in in one read , dont use readline.