Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 27th, 2004, 11:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Default TIF Files

I am having trouble getting a TIF file to show up in my IE browser. Is there some sort of plug-in or code that will force it to show. I'd rather have code or a setting I can set to show them instead of it wanting to download them. I'd rather it not be some active X or install on the user end as many of our users do not have install capabilities though I will take that if there is no other way. Thanks in advance for anyone's help.

Chris
__________________
Chris
  #2 (permalink)  
Old July 27th, 2004, 03:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

Use this code.
Code:
<%
    response.buffer = true
    'Should be variable, depending on the filetype
    response.ContentType ="image/tiff"

    Dim objStream
    Set objStream = Server.CreateObject("ADODB.Stream")
    objStream.Open
    objStream.Type = 1
    objStream.LoadFromFile ("c:\test.tif")

    Dim objBinaryFile
    objBinaryFile=objStream.Read
    response.binarywrite objBinaryFile
    response.end
%>
Cheers!

_________________________
- Vijay G
Strive for Perfection
  #3 (permalink)  
Old July 28th, 2004, 09:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok, I ahd to put that on it's own page. It did not seem to work over a mapped drive though that may be something I did wrong. Of more concern to me it that it shows the picture in binary. These tiff files are multi image files as I understand it. I am not sure how to get them to show right. This code got me the binary view, but I need the images themselves to show.

Chris
  #4 (permalink)  
Old July 28th, 2004, 04:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Chris,

I am not sure what you are missing, but I am 100% okay with that code, as it works fine for me, be it try and show Tif image from a remote system sharedfolder.

I haven't ever tried that so far, until you posted it here. It got that right the first time(Yes, I see the image displayed on my IE browser) and posted the same without any modifications.

Hope you are missing something else.
Cheers!

_________________________
- Vijay G
Strive for Perfection


Similar Threads
Thread Thread Starter Forum Replies Last Post
Base64binary to TIF aveekb Pro VB 6 0 February 13th, 2007 07:23 AM
Display Thumbnails of TIF&PDF aprababu C# 0 November 9th, 2006 08:59 AM
Covert TIF to PDF Zeus_Man .NET Framework 1.x 0 October 4th, 2006 10:55 AM
Converting TIF images to PDF Zeus_Man Crystal Reports 0 October 4th, 2006 10:50 AM
Display tif kkaminaris PHP How-To 1 June 8th, 2004 06:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.