How do i open a .tif file in an ASP page.
I am using VS-2005.
Is there any specific control available for opening .tif files.
Coz i have tried using Image and ImageMap controls without any joy.
ch_nilanjan
0
Newbie Poster
Recommended Answers
Jump to PostHi IE wont support tif files to display. so u need to convert that tif into gif or any otherformat. The following is some sample code. Hope it helps u.
System.IO.Stream _stream = new System.IO.FileStream(@"img\Calendar2008.tif", System.IO.FileMode.Open); Bitmap _bmp = new Bitmap(_stream); Context.Response.ContentType = "image/gif"; _bmp.Save(Context.Response.OutputStream, ImageFormat.Gif); _bmp.Dispose(); …
Jump to Posthey try the following...
using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Drawing.Imaging; using System.Collections.Specialized; using System.Drawing; //using Microsoft.Web; public partial class dani : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { System.IO.Stream _stream = new System.IO.FileStream(@"c:\Calendar2008.tif", System.IO.FileMode.Open); Bitmap …
All 7 Replies
kameswari
2
Junior Poster in Training
ch_nilanjan
0
Newbie Poster
kameswari
2
Junior Poster in Training
ch_nilanjan
0
Newbie Poster
kameswari
2
Junior Poster in Training
ch_nilanjan
0
Newbie Poster
Ramesh S
129
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.