473,386 Members | 1,803 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,386 software developers and data experts.

Display tiff images

Hi All,

In my application, I have to display tiff images
stored on server. Please help me in acheaving this.

With Regards,
Mustaq Ahmed.A

Oct 5 '07 #1
1 2623
On Oct 5, 9:01 am, "a.mus...@gmail.com" <a.mus...@gmail.comwrote:
Hi All,

In my application, I have to display tiff images
stored on server. Please help me in acheaving this.

With Regards,
Mustaq Ahmed.A
Here's a sample script that will work as showimage.aspx?
image=file.tiff, where file.tiff is a name of the file in the root

<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
string imageLocation = Server.MapPath(Request.QueryString["image"]);
System.Drawing.Bitmap origBitmap = new
System.Drawing.Bitmap(imageLocation);
System.Drawing.Bitmap outputImage = new
System.Drawing.Bitmap(origBitmap);
System.Drawing.Imaging.ImageFormat outputFormat =
System.Drawing.Imaging.ImageFormat.Jpeg;
outputImage.Save(Response.OutputStream, outputFormat);
outputImage.Dispose();
origBitmap.Dispose();
}
</script>

as you can see it converts an image into Jpeg. Note, that the
System.Drawing.Bitmap object has a problem to load some TIF files.
Some work and some don't ("Parameter is not valid" error is thrown).
As I see it can be a problem of the format. For example, for files
with no compression, or in LZW it would work, and ZIP is not working.

Hope it helps

Oct 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul | last post by:
I have tiff images stored in a sql database as image datatype. Through code, I will do a select statement on the table and need to output a selected tiff in my browser. I realize that browsers do...
4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
2
by: Dev | last post by:
Dear Friends, I have 20 images in Array list.How do display the images into picture box every 1 second.If anyone knows please let me know....I don't want reload the form.The images are comming...
5
by: Sameer Gupta | last post by:
what are options for opening / handling tiff files in .Net framework ? which is the best library, namespace ? Please help Regards Sameer Gupta C# Designer & Developer Siemens UK
0
by: Linta | last post by:
Hi, Actually i want to display mutiple images using BinaryWrite method. I am able to store all the images in an object.My problem is that i couldnt display all that images in the browser. I am...
0
by: wbsmith | last post by:
hello all, i am using python (2.5) with the PIL (latest release), and i am trying to read in these 3-d tiff images we have. basically, i am following some example code that iterates through...
2
by: phanimadhav | last post by:
i have one problem.i am using the fileupload control for updating the images. how can i reterive the images from SQLSERVER and my client requirement is at retreiving time that image can open only in...
1
by: Scott Elgram | last post by:
Hello everyone, I'm hoping someone here can pose an alternative that might work better than what I have created so far. I have a web site that needs to deal with Multi-Page TIFF images. ...
0
by: snehal s | last post by:
How to merge tiff images which may be multipage or single page using C# in VS 2005?
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.