S
Srinivas Chundi
I have to display tif images using .asp page. I have tried to read the image
as a binary file and stream it to the browser. The relevant code is as
follows. Unfortunately, the display on the browser is a lot of gobledygook.
How can I ensure that the image displays correctly in the browser?
Dim objStream
Dim FilImage, FolImage, strFilImage
Dim adTypeBinary adTypeBinary = 1
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile "\\servername\image.tif"
Response.ContentType = "application/tif"
'I have also tried "image/tif"
Response.BinaryWrite
objStream.Read
objStream.Close
Set objStream = Nothing
Currently, if the user wants to view a .tif image, double clicking on the
image file launches a software known as "Imaging for Windows Preview". If ie
explorer can't display .tif images, it would be ok if the asp page can
somehow lauch this software on the users machine and display the image in
it.
Thanks a lot
-M
as a binary file and stream it to the browser. The relevant code is as
follows. Unfortunately, the display on the browser is a lot of gobledygook.
How can I ensure that the image displays correctly in the browser?
Dim objStream
Dim FilImage, FolImage, strFilImage
Dim adTypeBinary adTypeBinary = 1
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile "\\servername\image.tif"
Response.ContentType = "application/tif"
'I have also tried "image/tif"
Response.BinaryWrite
objStream.Read
objStream.Close
Set objStream = Nothing
Currently, if the user wants to view a .tif image, double clicking on the
image file launches a software known as "Imaging for Windows Preview". If ie
explorer can't display .tif images, it would be ok if the asp page can
somehow lauch this software on the users machine and display the image in
it.
Thanks a lot
-M