473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

opening TIFF files in asp.net image

Hi,

How to open tiff files in asp.net image to display. And also how to use alternaTiff in asp.net image to display tiff.

Thanks in advance.

Regards,
Nanjunda
Sep 3 '06 #1
2 15347
izzy
12
A quick google search came up with: http://www.sitepoint.com/article/gen...net-images-fly

Hi,

How to open tiff files in asp.net image to display. And also how to use alternaTiff in asp.net image to display tiff.

Thanks in advance.

Regards,
Nanjunda
Sep 3 '06 #2
Hi Nanjunda,
here is a part of code that i have use in some of my projects:

in cs file

SqlConnection conn = new SqlConnection(sConn);
SqlCommand cmd = new SqlCommand("somespthatstractsimagefromdb '" + idimagen[0] + "'", conn);

conn.Open();
SqlDataReader sdr = cmd.ExecuteReader();
sdr.Read();
string sfile = sdr[2].ToString();
strpath = strpath + sfile + ".tif";

blob = new Byte[(sdr.GetBytes(0, 0, null, 0, int.MaxValue))];
sdr.GetBytes(0, 0, blob, 0, blob.Length);
sdr.Close();
conn.Close();
fs = new FileStream(strpath, FileMode.Create, FileAccess.Write);
fs.Write(blob, 0, blob.Length);
fs.Close();
Session.Add("ruta", strpath);

in aspx file
<div>
<embed width=900 height=550
src="<%=Session["ruta"]%>" type="image/tiff"
negative=no mousemode="pan" fit="width"
toolbaritems="ZO,PA,PG,PP,NP,O4,O1,O2,O3" >
</div>

Hope it helps.

Roberto.
Jun 7 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shumit Rehman | last post by:
Hi I have a table which has path names to photos I would like to view. I would like to open some/any kind of image viewer(Paint) to see the picture when I click the pathname. The pictures are...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
0
by: Will Arrowsmith | last post by:
Hi All, I am trying to create a .tiff file to fax using the windows fax service FAXCOMLib. I have created an array of images (bitmaps) and converted them to 1pbb format in order to allow...
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
1
by: amit gupta | last post by:
Hello, I am using QuarkXPress on Macintosh to generate EPS Files with Tiff Preview embedded in it. I have written some C code to extract Tiff Preview from EPS files generated which works pretty...
0
by: Dan | last post by:
The problem that I am having is that I need to view an image, in a VB dotnet application, that has been scanned using the "Image Everywhere Scan 3.02" scanning software and is saved as a...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
6
by: sternr | last post by:
Hey, When I try to run the following code: System.Drawing.Image tiffImage = System.Drawing.Image.FromFile(@"C: \Image.tiff"); I get an "Out Of Memory" Exception. Does anybody know how...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.