Display TIFF Image

A

Al Reid

Is it possible to display an image that is stored on the server as a TIFF image, on an ASP.Net page without the use of an add-in
viewer? If so, could someone tell me how to do it?

TIA
 
J

John Timney \(ASP.NET MVP\)

IE certainly has no support for tiff natively, so you'd be better off
converting from tiff to jpg and displaying that.
Theres a few conversion examples on google you could probably tweak, and
..net supports the tiff frormat

Some links to get you started:

http://aspalliance.com/articleViewer.aspx?aId=140

http://codebetter.com/blogs/eric.wise/archive/2005/05/15/63236.aspx

http://msdn.microsoft.com/library/d...emDrawingImagingImageFormatClassTiffTopic.asp

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
M

Mona

Hi Al,

Regarding this issue of displaying an image that is stored on a server as a
TIFF image, I would like to tell you that IE certainly has no support for
displaying the TIFF image natively, however, you can convert from TIFF image
to a jpg image and displaying that. I would request you to please go through
the following article which exaplins the conversion of TIFF to jpg :

[ImageFormat.Tiff Property]
http://msdn.microsoft.com/library/d...emDrawingImagingImageFormatClassTiffTopic.asp

Hope this helps.

Best Regards,
Mona [Grapecity]

Al Reid said:
Is it possible to display an image that is stored on the server as a TIFF
image, on an ASP.Net page without the use of an add-in
 
Joined
Apr 26, 2007
Messages
2
Reaction score
0
displaying tiff in .net

Try this

Dim _stream As System.IO.Stream = New System.IO.FileStream("c:/images/AB00B114.Tif", System.IO.FileMode.Open)
Dim _bmp As New Bitmap(_stream)
Context.Response.ContentType = "image/gif"
_bmp.Save(Context.Response.OutputStream, ImageFormat.Gif)
_bmp.Dispose()
_stream.Close()
 
Joined
Apr 26, 2007
Messages
2
Reaction score
0
displaying tiff in .net

:weed: Try this :smoking: :stupido3: :search:

Dim _stream As System.IO.Stream = New System.IO.FileStream("c:/images/AB00B114.Tif", System.IO.FileMode.Open)
Dim _bmp As New Bitmap(_stream)
Context.Response.ContentType = "image/gif"
_bmp.Save(Context.Response.OutputStream, ImageFormat.Gif)
_bmp.Dispose()
_stream.Close()

BY - RISHI BAJAJ
 
Joined
Apr 26, 2010
Messages
1
Reaction score
0
How TO CONVERT TIFF TO BMP OR JEPG asp.net

IE dont support tiff files. So what you can do you convert tiff file into jpeg or bmp and display.

Read a tiff file and save it into bmp or jpeg file and dipslay.

Stream _stream = new FileStream("C:\\abc.tiff"path, System.IO.FileMode.Open);
MemoryStream storeStream = new MemoryStream();
storeStream.SetLength(_stream.Length);
_stream.Read(storeStream.GetBuffer(), 0, (int)_stream.Length);
storeStream.Flush();
_stream.Close();
Response.ContentType = "image/bmp";
storeStream.WriteTo(Response.OutputStream);
SaveMemoryStream(storeStream, "C:\\text1" + ".bmp");
storeStream.Close();
Response.End();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top