473,799 Members | 3,077 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2646
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(Objec t sender, EventArgs e)
{
string imageLocation = Server.MapPath( Request.QuerySt ring["image"]);
System.Drawing. Bitmap origBitmap = new
System.Drawing. Bitmap(imageLoc ation);
System.Drawing. Bitmap outputImage = new
System.Drawing. Bitmap(origBitm ap);
System.Drawing. Imaging.ImageFo rmat outputFormat =
System.Drawing. Imaging.ImageFo rmat.Jpeg;
outputImage.Sav e(Response.Outp utStream, outputFormat);
outputImage.Dis pose();
origBitmap.Disp ose();
}
</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
1085
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 not support tiffs, but is there a way to output it as binary. I have tried every example I can find on the net and still not getting the result I want. My latest error is a generic GDI eror. Has anyone accomplished this and can share any code....
4
8384
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 display the contents of a TIFF image file. According to the very limited documentation that I have been able to locate so far, all I should need to do is to drop the Image Edit Control onto the form in design mode, set the control's Image property to...
2
8520
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 from network... sample code or reference links are welcome.... Thanks, Dev
5
15016
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
1411
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 able to print either the first image or the last image. Am giving my code also here. int count = Convert.ToInt32(Session); object label = new object; Response.ClearContent(); ...
0
1803
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 the images in the 3-d tiff file like this: import Image
2
1127
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 Microsoft Office Picture Manager.how is it possible. plz give me the ur valueble suggestions.it's urgent plz. Thank u
1
2051
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. Primarily they need to be split by page or group of pages and uploaded into a DB. The code I have currently works alright but it throws a "Parameter is not valid." error on the line containing this code "using (Bitmap source = new Bitmap(imgFile))...
0
1285
by: snehal s | last post by:
How to merge tiff images which may be multipage or single page using C# in VS 2005?
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10473
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10025
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6804
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5461
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.